From 1b14b96e3d56e4654ad92d51235a2b83d78d2b29 Mon Sep 17 00:00:00 2001 From: Nghia Truong Date: Tue, 9 Jan 2024 21:45:08 -0800 Subject: [PATCH] Return metadata even if there is no column Signed-off-by: Nghia Truong --- cpp/src/io/orc/reader_impl.cu | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cpp/src/io/orc/reader_impl.cu b/cpp/src/io/orc/reader_impl.cu index 74ccdd9c7df..6b49d164ce9 100644 --- a/cpp/src/io/orc/reader_impl.cu +++ b/cpp/src/io/orc/reader_impl.cu @@ -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_metadata{}}; } + auto out_metadata = populate_metadata(); + + // There is no columns in the table. + if (_selected_columns.num_levels() == 0) { + return {std::make_unique
(), std::move(out_metadata)}; + } std::vector> 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()) {