[CP] [CP] [CP] Fix rollup SIGSEGV when building stored row
This commit is contained in:
@ -394,7 +394,7 @@ int64_t ObAggregateProcessor::ExtraResult::to_string(char* buf, const int64_t bu
|
||||
return pos;
|
||||
}
|
||||
|
||||
int ObAggrInfo::eval_aggr(ObChunkDatumStore::ShadowStoredRow<>& curr_row_results, ObEvalCtx& ctx) const
|
||||
int ObAggrInfo::eval_aggr(ObChunkDatumStore::ShadowStoredRow& curr_row_results, ObEvalCtx& ctx) const
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
if (param_exprs_.empty() && T_FUN_COUNT == get_expr_type()) {
|
||||
@ -1908,7 +1908,7 @@ int ObAggregateProcessor::collect_aggr_result(AggrCell& aggr_cell, const ObExpr*
|
||||
const ObChunkDatumStore::StoredRow* storted_row = NULL;
|
||||
int64_t rank_num = 0;
|
||||
bool need_check_order_equal = T_FUN_GROUP_DENSE_RANK == aggr_fun;
|
||||
ObChunkDatumStore::LastStoredRow<> prev_row(aggr_alloc_);
|
||||
ObChunkDatumStore::LastStoredRow prev_row(aggr_alloc_);
|
||||
int64_t total_sort_row_cnt = extra->get_row_count();
|
||||
bool is_first = true;
|
||||
while (OB_SUCC(ret) && OB_SUCC(extra->get_next_row(storted_row))) {
|
||||
@ -2044,7 +2044,7 @@ int ObAggregateProcessor::collect_aggr_result(AggrCell& aggr_cell, const ObExpr*
|
||||
const int64_t total_row_count = extra->get_row_count();
|
||||
char buf_alloc[number::ObNumber::MAX_CALC_BYTE_LEN];
|
||||
ObDataBuffer allocator(buf_alloc, number::ObNumber::MAX_CALC_BYTE_LEN);
|
||||
ObChunkDatumStore::LastStoredRow<> prev_row(aggr_alloc_);
|
||||
ObChunkDatumStore::LastStoredRow prev_row(aggr_alloc_);
|
||||
number::ObNumber factor;
|
||||
bool need_linear_inter = false;
|
||||
int64_t not_null_start_loc = 0;
|
||||
@ -2163,7 +2163,7 @@ int ObAggregateProcessor::collect_aggr_result(AggrCell& aggr_cell, const ObExpr*
|
||||
LOG_WARN("finish_add_row failed", KPC(extra), K(ret));
|
||||
} else {
|
||||
const ObChunkDatumStore::StoredRow* storted_row = NULL;
|
||||
ObChunkDatumStore::LastStoredRow<> first_row(aggr_alloc_);
|
||||
ObChunkDatumStore::LastStoredRow first_row(aggr_alloc_);
|
||||
bool is_first = true;
|
||||
while (OB_SUCC(ret) && OB_SUCC(extra->get_next_row(storted_row))) {
|
||||
bool is_equal = false;
|
||||
@ -2925,7 +2925,7 @@ int ObAggregateProcessor::compare_calc(const ObDatum& left_value, const ObDatum&
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObAggregateProcessor::check_rows_equal(const ObChunkDatumStore::LastStoredRow<>& prev_row,
|
||||
int ObAggregateProcessor::check_rows_equal(const ObChunkDatumStore::LastStoredRow& prev_row,
|
||||
const ObChunkDatumStore::StoredRow& cur_row, const ObAggrInfo& aggr_info, bool& is_equal)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
@ -3190,7 +3190,7 @@ int ObAggregateProcessor::get_wm_concat_result(
|
||||
LOG_WARN("finish_add_row failed", KPC(extra), K(ret));
|
||||
} else {
|
||||
ObString sep_str = ObCharsetUtils::get_const_str(aggr_info.expr_->datum_meta_.cs_type_, ',');
|
||||
ObChunkDatumStore::LastStoredRow<> first_row(aggr_alloc_);
|
||||
ObChunkDatumStore::LastStoredRow first_row(aggr_alloc_);
|
||||
const ObChunkDatumStore::StoredRow* storted_row = NULL;
|
||||
bool is_first = true;
|
||||
bool need_continue = true;
|
||||
|
||||
@ -62,7 +62,7 @@ public:
|
||||
? 1
|
||||
: ((T_FUN_COUNT == get_expr_type() && param_exprs_.empty()) ? 0 : param_exprs_.count());
|
||||
}
|
||||
int eval_aggr(ObChunkDatumStore::ShadowStoredRow<>& curr_row_results, ObEvalCtx& ctx) const;
|
||||
int eval_aggr(ObChunkDatumStore::ShadowStoredRow& curr_row_results, ObEvalCtx& ctx) const;
|
||||
inline void set_implicit_first_aggr()
|
||||
{
|
||||
is_implicit_first_aggr_ = true;
|
||||
@ -326,7 +326,7 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
ObChunkDatumStore::ShadowStoredRow<> curr_row_results_;
|
||||
ObChunkDatumStore::ShadowStoredRow curr_row_results_;
|
||||
|
||||
private:
|
||||
// for avg/count
|
||||
@ -466,7 +466,7 @@ private:
|
||||
int rollup_distinct(AggrCell& aggr_cell, AggrCell& rollup_cell);
|
||||
int compare_calc(const ObDatum& left_value, const ObDatum& right_value, const ObAggrInfo& aggr_info, int64_t index,
|
||||
int& compare_result, bool& is_asc);
|
||||
int check_rows_equal(const ObChunkDatumStore::LastStoredRow<>& prev_row, const ObChunkDatumStore::StoredRow& cur_row,
|
||||
int check_rows_equal(const ObChunkDatumStore::LastStoredRow& prev_row, const ObChunkDatumStore::StoredRow& cur_row,
|
||||
const ObAggrInfo& aggr_info, bool& is_equal);
|
||||
int get_wm_concat_result(
|
||||
const ObAggrInfo& aggr_info, GroupConcatExtraResult*& extra, bool is_keep_group_concat, ObDatum& concat_result);
|
||||
|
||||
@ -50,7 +50,7 @@ public:
|
||||
};
|
||||
|
||||
private:
|
||||
typedef ObChunkDatumStore::LastStoredRow<ObChunkDatumStore::StoredRow> LastStoreRow;
|
||||
typedef ObChunkDatumStore::LastStoredRow LastStoreRow;
|
||||
bool first_got_row_;
|
||||
common::ObArenaAllocator alloc_;
|
||||
LastStoreRow last_row_;
|
||||
@ -60,4 +60,4 @@ private:
|
||||
} // end namespace sql
|
||||
} // end namespace oceanbase
|
||||
|
||||
#endif /* OCEANBASE_SRC_SQL_ENGINE_AGGREGATE_OB_MERGE_DISTINCT_OP_H_ */
|
||||
#endif /* OCEANBASE_SRC_SQL_ENGINE_AGGREGATE_OB_MERGE_DISTINCT_OP_H_ */
|
||||
|
||||
@ -97,7 +97,7 @@ private:
|
||||
// added to support groupby with rollup
|
||||
int64_t cur_output_group_id_;
|
||||
int64_t first_output_group_id_;
|
||||
ObChunkDatumStore::LastStoredRow<> last_child_output_;
|
||||
ObChunkDatumStore::LastStoredRow last_child_output_;
|
||||
DatumFixedArray curr_groupby_datums_;
|
||||
int64_t dir_id_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user