wgtmac commented on PR #15244:
URL: https://github.com/apache/arrow/pull/15244#issuecomment-1378265861
> I found Decimal256 doesn't work with this code path if `store_schema` is
set. Could you also address that? Here is a unit test that should reproduce:
>
> ```c++
> TEST(ArrowReadWrite, Decimal256AsInt) {
> using ::arrow::Decimal256;
> using ::arrow::field;
>
> auto type = ::arrow::decimal256(8, 4);
>
> const char* json = R"(["1.0000", null, "-1.2345", "-1000.5678",
> "-9999.9999", "9999.9999"])";
> auto array = ::arrow::ArrayFromJSON(type, json);
> auto table = ::arrow::Table::Make(::arrow::schema({field("root",
type)}), {array});
>
> parquet::WriterProperties::Builder builder;
> // Enforce integer type to annotate decimal type
> auto writer_properties =
builder.enable_integer_annotate_decimal()->build();
> auto props_store_schema =
ArrowWriterProperties::Builder().store_schema()->build();
>
> CheckConfiguredRoundtrip(table, table, writer_properties,
props_store_schema);
> }
> ```
Fixed and added the test case. Please take a look again. Thanks! @wjones127
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]