Skip to content

Commit

Permalink
[Fix](orc-reader) Fix filling partition or missing column used incorr…
Browse files Browse the repository at this point in the history
…ect row count.
  • Loading branch information
kaka11chen committed Aug 17, 2023
1 parent 41bce29 commit 36fe9e7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions be/src/vec/exec/format/orc/vorc_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1413,8 +1413,8 @@ Status OrcReader::get_next_block(Block* block, size_t* read_rows, bool* eof) {
}
*read_rows = rr;

RETURN_IF_ERROR(_fill_partition_columns(block, rr, _lazy_read_ctx.partition_columns));
RETURN_IF_ERROR(_fill_missing_columns(block, rr, _lazy_read_ctx.missing_columns));
RETURN_IF_ERROR(_fill_partition_columns(block, _batch->numElements, _lazy_read_ctx.partition_columns));
RETURN_IF_ERROR(_fill_missing_columns(block, _batch->numElements, _lazy_read_ctx.missing_columns));

if (block->rows() == 0) {
*eof = true;
Expand Down Expand Up @@ -1488,15 +1488,15 @@ Status OrcReader::get_next_block(Block* block, size_t* read_rows, bool* eof) {
*read_rows = rr;

RETURN_IF_ERROR(
_fill_partition_columns(block, *read_rows, _lazy_read_ctx.partition_columns));
RETURN_IF_ERROR(_fill_missing_columns(block, *read_rows, _lazy_read_ctx.missing_columns));
_fill_partition_columns(block, _batch->numElements, _lazy_read_ctx.partition_columns));
RETURN_IF_ERROR(_fill_missing_columns(block, _batch->numElements, _lazy_read_ctx.missing_columns));

if (block->rows() == 0) {
*eof = true;
return Status::OK();
}

_build_delete_row_filter(block, rr);
_build_delete_row_filter(block, _batch->numElements);

std::vector<uint32_t> columns_to_filter;
int column_to_keep = block->columns();
Expand Down

0 comments on commit 36fe9e7

Please sign in to comment.