Skip to content

Commit

Permalink
Fix stream test
Browse files Browse the repository at this point in the history
Signed-off-by: Nghia Truong <[email protected]>
  • Loading branch information
ttnghia committed Oct 12, 2024
1 parent cdfca74 commit 14b5688
Showing 1 changed file with 8 additions and 26 deletions.
34 changes: 8 additions & 26 deletions cpp/tests/streams/io/orc_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,31 +99,6 @@ cudf::table construct_table()
return cudf::table(std::move(colsptr));
}

TEST_F(ORCTest, ORCWriter)
{
auto tab = construct_table();
auto filepath = temp_env->get_temp_filepath("OrcMultiColumn.orc");
cudf::io::orc_writer_options out_opts =
cudf::io::orc_writer_options::builder(cudf::io::sink_info{filepath}, tab);
cudf::io::write_orc(out_opts, cudf::test::get_default_stream());
}

TEST_F(ORCTest, ORCReader)
{
auto tab = construct_table();
auto filepath = temp_env->get_temp_filepath("OrcMultiColumn.orc");
cudf::io::orc_writer_options out_opts =
cudf::io::orc_writer_options::builder(cudf::io::sink_info{filepath}, tab);
cudf::io::write_orc(out_opts, cudf::test::get_default_stream());

cudf::io::orc_reader_options read_opts =
cudf::io::orc_reader_options::builder(cudf::io::source_info{{filepath}});
auto result = cudf::io::read_orc(read_opts, cudf::test::get_default_stream());

auto meta = read_orc_metadata(cudf::io::source_info{filepath});
auto const stats = cudf::io::read_parsed_orc_statistics(cudf::io::source_info{filepath});
}

TEST_F(ORCTest, ORCChunkedReader)
{
auto tab = construct_table();
Expand All @@ -132,12 +107,19 @@ TEST_F(ORCTest, ORCChunkedReader)
cudf::io::orc_writer_options::builder(cudf::io::sink_info{filepath}, tab);
cudf::io::write_orc(out_opts, cudf::test::get_default_stream());

auto stream = cudf::test::get_default_stream();

auto const read_opts =
cudf::io::orc_reader_options::builder(cudf::io::source_info{filepath}).build();
auto reader = cudf::io::chunked_orc_reader(static_cast<std::size_t>(0UL),
static_cast<std::size_t>(1UL),
static_cast<cudf::size_type>(10000),
read_opts);
read_opts,
stream);

printf(" test line %d, stream = %zu\n", __LINE__, (size_t)stream.value());
printf("line %d\n", __LINE__);
fflush(stdout);

auto out_tables = std::vector<std::unique_ptr<cudf::table>>{};

Expand Down

0 comments on commit 14b5688

Please sign in to comment.