Skip to content

Commit

Permalink
[Fix](segment iterator) use correct column_id (apache#36313)
Browse files Browse the repository at this point in the history
previous PR apache#36277 use wrong column_id to access
`_storage_name_and_type` and may result nullptr
  • Loading branch information
eldenmoon committed Jun 19, 2024
1 parent 5b0620d commit f3d06da
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions be/src/olap/rowset/segment_v2/segment_iterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -980,9 +980,9 @@ std::string SegmentIterator::_gen_predicate_result_sign(ColumnPredicateInfo* pre
if (column_desc->path() != nullptr) {
const static std::string pattern = "(CAST {}(Nullable(Variant)) TO {})";
// indicate a subcolumn access for variant, using the expression pattern as pred result sign name
col_name =
fmt::format(pattern, col_name,
_storage_name_and_type[predicate_info->column_id].second->get_name());
col_name = fmt::format(pattern, col_name,
_storage_name_and_type[_schema->column_id(predicate_info->column_id)]
.second->get_name());
}
std::string pred_result_sign;
pred_result_sign = BeConsts::BLOCK_TEMP_COLUMN_PREFIX + col_name + "_" +
Expand Down

0 comments on commit f3d06da

Please sign in to comment.