aihuaxu commented on code in PR #3258:
URL: https://github.com/apache/parquet-java/pull/3258#discussion_r2249036054
##########
parquet-avro/src/main/java/org/apache/parquet/avro/AvroVariantConverter.java:
##########
@@ -34,21 +35,27 @@
* Converter for Variant values.
*/
class AvroVariantConverter extends GroupConverter implements
VariantConverters.ParentConverter<VariantBuilder> {
+ private static final Schema VARIANT_SCHEMA =
SchemaBuilder.record("VariantRecord")
+ .fields()
+ .name("metadata")
+ .type()
+ .bytesType()
+ .noDefault()
+ .name("value")
+ .type()
+ .bytesType()
+ .noDefault()
+ .endRecord();
+
private final ParentValueContainer parent;
- private final Schema avroSchema;
private final GenericData model;
- private final int metadataPos;
- private final int valuePos;
Review Comment:
We are passing in a schema which may not have `value` or `typed_value`
fields. As I understand, we want to return a record of `value` and `metadata`
fields for a variant in Avro.
--
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]