Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
vuule committed Jan 8, 2025
1 parent fc76893 commit bd939a4
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions cpp/tests/io/orc_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2195,4 +2195,23 @@ TEST_F(OrcChunkedWriterTest, NoDataInSinkWhenNoWrite)
EXPECT_EQ(out_buffer.size(), 0);
}

TEST_F(OrcWriterTest, MultipleBlocksInStripeFooter)
{
std::vector<std::string> vals_col(8, "a");
str_col col{vals_col.begin(), vals_col.end()};
cudf::column_view col_view = col;
table_view expected(std::vector<cudf::column_view>{6400, col_view});

std::vector<char> out_buffer;
cudf::io::orc_writer_options out_opts =
cudf::io::orc_writer_options::builder(cudf::io::sink_info{&out_buffer}, expected);
// Write with compression on (default)
cudf::io::write_orc(out_opts);

cudf::io::orc_reader_options in_opts = cudf::io::orc_reader_options::builder(
cudf::io::source_info{out_buffer.data(), out_buffer.size()});
auto result = cudf::io::read_orc(in_opts);
CUDF_TEST_EXPECT_TABLES_EQUAL(expected, result.tbl->view());
}

CUDF_TEST_PROGRAM_MAIN()

0 comments on commit bd939a4

Please sign in to comment.