Skip to content

Commit

Permalink
Return metadata even if there is no column
Browse files Browse the repository at this point in the history
Signed-off-by: Nghia Truong <[email protected]>
  • Loading branch information
ttnghia committed Jan 10, 2024
1 parent b557546 commit 1b14b96
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions cpp/src/io/orc/reader_impl.cu
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,14 @@ table_metadata reader::impl::populate_metadata()

table_with_metadata reader::impl::read_chunk_internal()
{
// There are no columns in the table
if (_selected_columns.num_levels() == 0) { return {std::make_unique<table>(), table_metadata{}}; }
auto out_metadata = populate_metadata();

// There is no columns in the table.
if (_selected_columns.num_levels() == 0) {
return {std::make_unique<table>(), std::move(out_metadata)};
}

std::vector<std::unique_ptr<column>> out_columns;
auto out_metadata = populate_metadata();

// If no rows or stripes to read, return empty columns
if (_file_itm_data->rows_to_read == 0 || _file_itm_data->selected_stripes.empty()) {
Expand Down

0 comments on commit 1b14b96

Please sign in to comment.