cp bug fix to open source branch
This commit is contained in:
@ -6021,11 +6021,10 @@ int ObStaticEngineCG::fill_aggr_info(ObAggFunRawExpr& raw_expr, ObExpr& expr, Ob
|
||||
if (OB_SUCC(ret) && !raw_expr.get_order_items().empty()) {
|
||||
aggr_info.has_order_by_ = true;
|
||||
if (OB_FAIL(fil_sort_info(raw_expr.get_order_items(),
|
||||
all_param_exprs,
|
||||
NULL,
|
||||
aggr_info.sort_collations_,
|
||||
aggr_info.sort_cmp_funcs_,
|
||||
raw_expr.get_expr_type()))) {
|
||||
all_param_exprs,
|
||||
NULL,
|
||||
aggr_info.sort_collations_,
|
||||
aggr_info.sort_cmp_funcs_))) {
|
||||
LOG_WARN("failed to fil_sort_info", K(ret));
|
||||
} else { /*do nothing*/
|
||||
}
|
||||
@ -6272,9 +6271,9 @@ int ObStaticEngineCG::fill_wf_info(ObIArray<ObExpr*>& all_expr, ObWinFunRawExpr&
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObStaticEngineCG::fil_sort_info(const ObIArray<OrderItem>& sort_keys, ObIArray<ObExpr*>& all_exprs,
|
||||
ObIArray<ObExpr*>* sort_exprs, ObSortCollations& sort_collations, ObSortFuncs& sort_cmp_funcs,
|
||||
const ObItemType aggr_type)
|
||||
int ObStaticEngineCG::fil_sort_info(const ObIArray<OrderItem> &sort_keys,
|
||||
ObIArray<ObExpr *> &all_exprs, ObIArray<ObExpr *> *sort_exprs,
|
||||
ObSortCollations &sort_collations, ObSortFuncs &sort_cmp_funcs)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
if (OB_FAIL(sort_collations.init(sort_keys.count()))) {
|
||||
@ -6308,20 +6307,11 @@ int ObStaticEngineCG::fil_sort_info(const ObIArray<OrderItem>& sort_keys, ObIArr
|
||||
order_item.is_ascending(),
|
||||
(order_item.is_null_first() ^ order_item.is_ascending()) ? NULL_LAST : NULL_FIRST);
|
||||
ObSortCmpFunc cmp_func;
|
||||
if (lib::is_oracle_mode() && ObDatumFuncs::is_string_type(expr->datum_meta_.type_) &&
|
||||
T_FUN_GROUP_PERCENTILE_DISC == aggr_type) {
|
||||
cmp_func.cmp_func_ = ObDatumFuncs::get_nullsafe_cmp_func(expr->datum_meta_.type_,
|
||||
expr->datum_meta_.type_,
|
||||
field_collation.null_pos_,
|
||||
field_collation.cs_type_,
|
||||
false);
|
||||
} else {
|
||||
cmp_func.cmp_func_ = ObDatumFuncs::get_nullsafe_cmp_func(expr->datum_meta_.type_,
|
||||
expr->datum_meta_.type_,
|
||||
field_collation.null_pos_,
|
||||
field_collation.cs_type_,
|
||||
lib::is_oracle_mode());
|
||||
}
|
||||
cmp_func.cmp_func_ = ObDatumFuncs::get_nullsafe_cmp_func(expr->datum_meta_.type_,
|
||||
expr->datum_meta_.type_,
|
||||
field_collation.null_pos_,
|
||||
field_collation.cs_type_,
|
||||
lib::is_oracle_mode());
|
||||
if (OB_ISNULL(cmp_func.cmp_func_)) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("cmp_func is null, check datatype is valid", K(ret));
|
||||
|
||||
@ -395,7 +395,7 @@ private:
|
||||
|
||||
int fill_wf_info(ObIArray<ObExpr*>& all_expr, ObWinFunRawExpr& win_expr, WinFuncInfo& wf_info);
|
||||
int fil_sort_info(const ObIArray<OrderItem>& sort_keys, ObIArray<ObExpr*>& all_exprs, ObIArray<ObExpr*>* sort_exprs,
|
||||
ObSortCollations& sort_collations, ObSortFuncs& sort_cmp_funcs, const ObItemType aggr_type = T_INVALID);
|
||||
ObSortCollations& sort_collations, ObSortFuncs& sort_cmp_funcs);
|
||||
int get_pdml_partition_id_column_idx(const ObIArray<ObExpr*>& dml_exprs, int64_t& idx);
|
||||
|
||||
int do_gi_partition_pruning(ObLogJoin& op, ObBasicNestedLoopJoinSpec& spec);
|
||||
|
||||
Reference in New Issue
Block a user