voonhous commented on code in PR #20871:
URL: https://github.com/apache/hudi/pull/20871#discussion_r4719736171
##########
hudi-hadoop-mr/src/test/java/org/apache/hudi/hadoop/testutils/InputFormatTestUtil.java:
##########
@@ -580,8 +580,9 @@ public static StoragePath
writeVariantParquetFile(java.nio.file.Path dir, String
HoodieSchema writeSchema = HoodieSchema.createRecord("TestRecord", null,
null, fields);
Configuration conf = new Configuration();
if (withInt96Timestamp) {
- // parquet-avro writes a fixed(12) as INT96 only for the paths named
here.
- conf.set(AvroWriteSupport.WRITE_FIXED_AS_INT96, "ts");
+ // parquet-avro writes a fixed(12) as INT96 only for the paths named
here. The property is set
+ // by its key, since AvroWriteSupport has no constant for it before
parquet 1.13.
+ conf.set("parquet.avro.writeFixedAsInt96", "ts");
Review Comment:
**major:** On parquet-avro 1.12.2 this key is ignored, so `ts` lands as
`FIXED_LEN_BYTE_ARRAY` and `testLegacyReaderGuardIsBestEffort` fails its "must
really be INT96" assert under `-Dspark3.3` (reproduced: expected INT96, was
FIXED_LEN_BYTE_ARRAY). 1.12.2 still throws "INT96 is deprecated" on the footer,
so that leg matters there too. Could we write the `ts` column without
parquet-avro, e.g. an `ExampleParquetWriter` over the converted `MessageType`
plus `Types.required(INT96).named("ts")`, so the leg holds on every parquet
version?
--
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]