bugfix : json arrayagg not support distinct clause
This commit is contained in:
@ -2126,18 +2126,23 @@ int ObAggregateProcessor::prepare_aggr_result(const ObChunkDatumStore::StoredRow
|
||||
LOG_WARN("fail to add row", K(ret));
|
||||
} else {
|
||||
if (aggr_fun == T_FUN_JSON_ARRAYAGG || aggr_fun == T_FUN_JSON_OBJECTAGG) {
|
||||
int64_t len = param_exprs->count();
|
||||
if (OB_FAIL(extra->reserve_bool_mark_count(len))) {
|
||||
LOG_WARN("reserve_bool_mark_count failed", K(ret), K(len));
|
||||
}
|
||||
for (int64_t i = 0; OB_SUCC(ret) && i < len; i++) {
|
||||
ObExpr *tmp = NULL;
|
||||
if (OB_FAIL(param_exprs->at(i, tmp))){
|
||||
LOG_WARN("fail to get param_exprs[i]", K(ret));
|
||||
} else {
|
||||
bool is_bool = (tmp->is_boolean_ == 1);
|
||||
if (OB_FAIL(extra->set_bool_mark(i, is_bool))){
|
||||
LOG_WARN("fail to set_bool_mark", K(ret));
|
||||
if (param_exprs == NULL) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("param sexprs not be null", K(ret));
|
||||
} else {
|
||||
int64_t len = param_exprs->count();
|
||||
if (OB_FAIL(extra->reserve_bool_mark_count(len))) {
|
||||
LOG_WARN("reserve_bool_mark_count failed", K(ret), K(len));
|
||||
}
|
||||
for (int64_t i = 0; OB_SUCC(ret) && i < len; i++) {
|
||||
ObExpr *tmp = NULL;
|
||||
if (OB_FAIL(param_exprs->at(i, tmp))){
|
||||
LOG_WARN("fail to get param_exprs[i]", K(ret));
|
||||
} else {
|
||||
bool is_bool = (tmp->is_boolean_ == 1);
|
||||
if (OB_FAIL(extra->set_bool_mark(i, is_bool))){
|
||||
LOG_WARN("fail to set_bool_mark", K(ret));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user