Skip to content

Commit

Permalink
Merge branch 'parquet-field-id-writing' of github.com:PointKernel/cud…
Browse files Browse the repository at this point in the history
…f into parquet-field-id-writing
  • Loading branch information
Chong Gao committed Apr 14, 2022
2 parents de3d17a + f657407 commit 2eeccef
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions cpp/tests/io/parquet_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3206,25 +3206,4 @@ TEST_F(ParquetWriterTest, RowGroupSizeInvalid)
cudf::logic_error);
}

TYPED_TEST(ParquetWriterSchemaTest, FieldID)
{
column_wrapper<TypeParam> col;
std::vector<std::unique_ptr<column>> cols;
cols.push_back(col.release());
auto expected = std::make_unique<table>(std::move(cols));

cudf_io::table_input_metadata expected_metadata(*expected);
auto constexpr gold = 825;
expected_metadata.column_metadata[0].set_parquet_field_id(gold);

auto filepath = temp_env->get_temp_filepath("FieldID.parquet");
cudf_io::parquet_writer_options out_opts =
cudf_io::parquet_writer_options::builder(cudf_io::sink_info{filepath}, expected->view())
.metadata(&expected_metadata);

auto got_metadata = out_opts.get_metadata();
EXPECT_TRUE(got_metadata->column_metadata[0].is_parquet_field_id_set());
EXPECT_EQ(gold, got_metadata->column_metadata[0].get_parquet_field_id());
}

CUDF_TEST_PROGRAM_MAIN()

0 comments on commit 2eeccef

Please sign in to comment.