From bd939a4ef524f96b084455a0fceca56ae8cea7e0 Mon Sep 17 00:00:00 2001 From: Vukasin Milovanovic Date: Wed, 8 Jan 2025 15:51:49 -0800 Subject: [PATCH] test --- cpp/tests/io/orc_test.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/cpp/tests/io/orc_test.cpp b/cpp/tests/io/orc_test.cpp index 2209a30149d..1f098e94cbf 100644 --- a/cpp/tests/io/orc_test.cpp +++ b/cpp/tests/io/orc_test.cpp @@ -2195,4 +2195,23 @@ TEST_F(OrcChunkedWriterTest, NoDataInSinkWhenNoWrite) EXPECT_EQ(out_buffer.size(), 0); } +TEST_F(OrcWriterTest, MultipleBlocksInStripeFooter) +{ + std::vector vals_col(8, "a"); + str_col col{vals_col.begin(), vals_col.end()}; + cudf::column_view col_view = col; + table_view expected(std::vector{6400, col_view}); + + std::vector 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()