aihuaxu commented on code in PR #3258:
URL: https://github.com/apache/parquet-java/pull/3258#discussion_r2241317311
##########
parquet-avro/src/main/java/org/apache/parquet/avro/AvroVariantConverter.java:
##########
@@ -77,10 +78,12 @@ public void end() {
builder.appendNullIfEmpty();
- Object record = model.newRecord(null, avroSchema);
- model.setField(record, "metadata", metadataPos,
metadata.getEncodedBuffer());
- model.setField(record, "value", valuePos, builder.encodedValue());
- parent.add(record);
+ Variant variant = builder.build();
+ parent.add(variant);
Review Comment:
By reading the mapping in https://iceberg.apache.org/spec/#avro, actually we
are expecting a record of metadata and value in Avro for variant.
Looks like that we just need to update the test rather than making the code.
@rdblue and @cashmand
<img width="693" height="136" alt="image"
src="https://github.com/user-attachments/assets/83f3d7b6-0edf-498d-a45e-43779c224ad5"
/>
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]