Skip to content

Commit

Permalink
[Fix](parquet-reader) Fix dict cols not be converted back to string t…
Browse files Browse the repository at this point in the history
…ype in some cases. (apache#19348)

Fix dict cols not be converted back to string type in some cases, which includes introduced by apache#19039.
For dict cols, we will convert dict cols to int32 type firstly, then convert back to string type after read block. 
The block will be reuse it, so it is necessary to convert it back.
  • Loading branch information
kaka11chen authored May 7, 2023
1 parent ed368d7 commit b50e2a8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions be/src/vec/exec/format/parquet/vparquet_group_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ Status RowGroupReader::next_batch(Block* block, size_t batch_size, size_t* read_
RETURN_IF_ERROR(_fill_missing_columns(block, *read_rows, _lazy_read_ctx.missing_columns));

if (block->rows() == 0) {
_convert_dict_cols_to_string_cols(block);
*read_rows = block->rows();
return Status::OK();
}
Expand Down Expand Up @@ -457,6 +458,7 @@ Status RowGroupReader::_do_lazy_read(Block* block, size_t batch_size, size_t* re
*read_rows = 0;
*batch_eof = true;
_lazy_read_filtered_rows += pre_read_rows;
_convert_dict_cols_to_string_cols(block);
return Status::OK();
}
} else {
Expand Down

0 comments on commit b50e2a8

Please sign in to comment.