Files
oceanbase/src/sql/optimizer/ob_log_stat_collector.h
obdev 2d19a9d8f5 [FEAT MERGE]4_1_sql_feature
Co-authored-by: leslieyuchen <leslieyuchen@gmail.com>
Co-authored-by: Charles0429 <xiezhenjiang@gmail.com>
Co-authored-by: raywill <hustos@gmail.com>
2023-01-28 16:01:28 +08:00

55 lines
1.8 KiB
C++

/**
* Copyright (c) 2021 OceanBase
* OceanBase CE is licensed under Mulan PubL v2.
* You can use this software according to the terms and conditions of the Mulan PubL v2.
* You may obtain a copy of Mulan PubL v2 at:
* http://license.coscl.org.cn/MulanPubL-2.0
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PubL v2 for more details.
*/
#ifndef OCEANBASE_SQL_OB_LOG_STAT_COLLECTOR_H_
#define OCEANBASE_SQL_OB_LOG_STAT_COLLECTOR_H_
#include "sql/optimizer/ob_logical_operator.h"
#include "sql/engine/px/ob_px_basic_info.h"
namespace oceanbase
{
namespace sql
{
class ObLogStatCollector : public ObLogicalOperator
{
public:
ObLogStatCollector(ObLogPlan &plan)
: ObLogicalOperator(plan),
sort_keys_(),
is_none_partition_(),
type_(ObStatCollectorType::NOT_INIT_TYPE)
{}
virtual ~ObLogStatCollector() {}
virtual const char *get_name() const;
int set_sort_keys(const common::ObIArray<OrderItem> &order_keys);
common::ObIArray<OrderItem> &get_sort_keys() { return sort_keys_; }
void set_stat_collector_type(ObStatCollectorType type) { type_ = type; }
ObStatCollectorType get_stat_collector_type() { return type_; }
void set_is_none_partition(bool flag) { is_none_partition_ = flag; }
bool get_is_none_partition() { return is_none_partition_; }
virtual int get_op_exprs(ObIArray<ObRawExpr*> &all_exprs) override;
virtual int inner_replace_op_exprs(
const common::ObIArray<std::pair<ObRawExpr *, ObRawExpr*>> &to_replace_exprs) override;
private:
common::ObSEArray<OrderItem, 8, common::ModulePageAllocator, true> sort_keys_;
bool is_none_partition_;
ObStatCollectorType type_;
};
}
}
#endif