opt adaptive hash gby calc simple aggr func (count/sum/min/max)
This commit is contained in:
@ -4969,8 +4969,12 @@ int ObStaticEngineCG::fill_aggr_infos(ObLogGroupBy &op,
|
||||
}
|
||||
|
||||
//4.add aggr columns
|
||||
spec.support_fast_single_row_agg_ = true;
|
||||
for (int64_t i = 0; OB_SUCC(ret) && i < all_aggr_exprs.count(); ++i) {
|
||||
ObAggrInfo &aggr_info = spec.aggr_infos_.at(i);
|
||||
if (!is_simple_aggr_expr(aggr_exprs.at(i)->get_expr_type())) {
|
||||
spec.support_fast_single_row_agg_ = false;
|
||||
}
|
||||
if (OB_FAIL(fill_aggr_info(*static_cast<ObAggFunRawExpr *>(aggr_exprs.at(i)),
|
||||
*all_aggr_exprs.at(i),
|
||||
aggr_info,
|
||||
|
||||
@ -457,6 +457,10 @@ private:
|
||||
int add_output_datum_check_flag(ObOpSpec &spec);
|
||||
int generate_calc_part_id_expr(const ObRawExpr &src, const ObDASTableLocMeta *loc_meta, ObExpr *&dst);
|
||||
int check_only_one_unique_key(const ObLogPlan &log_plan, const ObTableSchema* table_schema, bool& only_one_unique_key);
|
||||
bool is_simple_aggr_expr(const ObItemType &expr_type) { return T_FUN_COUNT == expr_type
|
||||
|| T_FUN_SUM == expr_type
|
||||
|| T_FUN_MAX == expr_type
|
||||
|| T_FUN_MIN == expr_type; }
|
||||
private:
|
||||
ObPhysicalPlan *phy_plan_;
|
||||
ObOptimizerContext *opt_ctx_;
|
||||
|
||||
Reference in New Issue
Block a user