Skip to content

Commit

Permalink
[Compatibility](agg-state) do not throw eception when DataTypeAggStat…
Browse files Browse the repository at this point in the history
…e meet old be exec version (#37104)

## Proposed changes
do not throw eception when DataTypeAggState meet old be exec version
this change is used to avoid memtable meet eception and core dump
  • Loading branch information
BiteTheDDDDt authored Jul 2, 2024
1 parent f517022 commit 9f80a4b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions be/src/vec/data_types/data_type_agg_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,13 @@ class DataTypeAggState : public DataTypeString {
_be_exec_version(be_exec_version) {
_agg_function = AggregateFunctionSimpleFactory::instance().get(_function_name, _sub_types,
_result_is_nullable);
if (_agg_function == nullptr ||
!BeExecVersionManager::check_be_exec_version(be_exec_version)) {
if (_agg_function == nullptr) {
throw Exception(ErrorCode::INVALID_ARGUMENT,
"DataTypeAggState function get failed, type={}", do_get_name());
}
if (!BeExecVersionManager::check_be_exec_version(be_exec_version)) {
LOG(WARNING) << "meet old agg-state, be_exec_version=" << be_exec_version;
}
_agg_function->set_version(be_exec_version);
_agg_serialized_type = _agg_function->get_serialized_type();
}
Expand Down

0 comments on commit 9f80a4b

Please sign in to comment.