diff --git a/cpp/examples/hybrid_scan_io/common_utils.cpp b/cpp/examples/hybrid_scan_io/common_utils.cpp index 635686171866..6f08f8e1965d 100644 --- a/cpp/examples/hybrid_scan_io/common_utils.cpp +++ b/cpp/examples/hybrid_scan_io/common_utils.cpp @@ -6,8 +6,7 @@ #include "common_utils.hpp" #include -#include -#include +#include #include #include @@ -69,30 +68,10 @@ void check_tables_equal(cudf::table_view const& lhs_table, cudf::table_view const& rhs_table, rmm::cuda_stream_view stream) { - try { - // Left anti-join the original and transcoded tables identical tables should not throw an - // exception and return an empty indices vector - cudf::filtered_join join_obj(lhs_table, cudf::null_equality::EQUAL, stream); - auto const indices = join_obj.anti_join(rhs_table, stream); - // No exception thrown, check indices - auto const tables_equal = indices->size() == 0; - if (tables_equal) { - std::cout << "Tables identical: " << std::boolalpha << tables_equal << "\n\n"; - } else { - // Helper to write parquet data for inspection - auto const write_parquet = - [](cudf::table_view table, std::string filepath, rmm::cuda_stream_view stream) { - auto sink_info = cudf::io::sink_info(filepath); - auto opts = cudf::io::parquet_writer_options::builder(sink_info, table).build(); - cudf::io::write_parquet(opts, stream); - }; - write_parquet(lhs_table, "lhs_table.parquet", stream); - write_parquet(rhs_table, "rhs_table.parquet", stream); - throw std::logic_error("Tables identical: false\n\n"); - } - } catch (std::exception& e) { - std::cout << e.what() << std::endl; - } + auto const tables_equal = + cudf::tables_equal(lhs_table, rhs_table, cudf::null_equality::EQUAL, stream); + std::cout << "Tables identical: " << std::boolalpha << tables_equal << "\n\n"; + if (not tables_equal) { throw std::logic_error("Table equality check failed"); } } std::vector extract_input_sources(std::string const& paths, diff --git a/cpp/examples/parquet_io/common_utils.cpp b/cpp/examples/parquet_io/common_utils.cpp index 26ae8ea5c0f0..2adc1b1007fb 100644 --- a/cpp/examples/parquet_io/common_utils.cpp +++ b/cpp/examples/parquet_io/common_utils.cpp @@ -7,7 +7,7 @@ #include #include -#include +#include #include #include @@ -87,19 +87,10 @@ void check_tables_equal(cudf::table_view const& lhs_table, cudf::table_view const& rhs_table, rmm::cuda_stream_view stream) { - try { - // Left anti-join the original and transcoded tables identical tables should not throw an - // exception and return an empty indices vector - cudf::filtered_join join_obj(lhs_table, cudf::null_equality::EQUAL, stream); - auto const indices = join_obj.anti_join(rhs_table, stream); - - // No exception thrown, check indices - auto const valid = indices->size() == 0; - std::cout << "Tables identical: " << valid << "\n\n"; - } catch (std::exception& e) { - std::cerr << e.what() << std::endl << std::endl; - throw std::runtime_error("Tables identical: false\n\n"); - } + auto const tables_equal = + cudf::tables_equal(lhs_table, rhs_table, cudf::null_equality::EQUAL, stream); + std::cout << "Tables identical: " << std::boolalpha << tables_equal << "\n\n"; + if (not tables_equal) { throw std::logic_error("Table equality check failed"); } } std::unique_ptr concatenate_tables(std::vector> tables, diff --git a/cpp/examples/parquet_io/parquet_io.cpp b/cpp/examples/parquet_io/parquet_io.cpp index a80ec5d44d54..33f78f060a03 100644 --- a/cpp/examples/parquet_io/parquet_io.cpp +++ b/cpp/examples/parquet_io/parquet_io.cpp @@ -4,7 +4,6 @@ */ #include "common_utils.hpp" -#include "io_source.hpp" #include "timer.hpp" #include