Skip to content

Commit

Permalink
[BugFix][Cherry-Pick][Branch-2.5] Fix using wrong parquet column chun…
Browse files Browse the repository at this point in the history
…k index in dict filter

Signed-off-by: Smith Cruise <[email protected]>
(cherry picked from commit a43b726)
  • Loading branch information
Smith-Cruise authored and wanpengfei-git committed May 10, 2023
1 parent 0e58a3d commit 26fbfb1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion be/src/formats/parquet/group_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,10 @@ void GroupReader::_process_columns_and_conjunct_ctxs() {
for (auto& column : _param.read_cols) {
int chunk_index = column.col_idx_in_chunk;
SlotId slot_id = column.slot_id;
const auto* parquet_field = _param.file_metadata->schema().get_stored_column_by_idx(column.col_idx_in_parquet);
DCHECK(parquet_field != nullptr);
const tparquet::ColumnMetaData& column_metadata =
_row_group_metadata->columns[column.col_idx_in_parquet].meta_data;
_row_group_metadata->columns[parquet_field->physical_column_index].meta_data;
if (_can_using_dict_filter(slots[chunk_index], conjunct_ctxs_by_slot, column_metadata)) {
_use_as_dict_filter_column[read_col_idx] = true;
_dict_filter_conjunct_ctxs[slot_id] = conjunct_ctxs_by_slot.at(slot_id);
Expand Down

0 comments on commit 26fbfb1

Please sign in to comment.