clairemcginty commented on code in PR #3753:
URL: https://github.com/apache/parquet-java/pull/3753#discussion_r3958929211


##########
parquet-avro/src/main/java/org/apache/parquet/avro/AvroReadSupport.java:
##########
@@ -128,6 +136,18 @@ public ReadContext init(
     MessageType projection = fileSchema;
     Map<String, String> metadata = new LinkedHashMap<String, String>();
 
+    boolean autoDetectListStructure =
+        configuration.getBoolean(AUTO_DETECT_LIST_STRUCTURE, 
AUTO_DETECT_LIST_STRUCTURE_DEFAULT);
+
+    if (autoDetectListStructure
+        && configuration.get(AvroWriteSupport.WRITE_OLD_LIST_STRUCTURE) == null
+        && configuration.get(AvroSchemaConverter.ADD_LIST_ELEMENT_RECORDS) == 
null) {
+      if (writesNewListStructure(fileSchema)) {
+        configuration.setBoolean(AvroWriteSupport.WRITE_OLD_LIST_STRUCTURE, 
false);

Review Comment:
   I went with the latter approach of just copying the Configuration and 
re-deriving it in both init() and prepareForRead(): 
https://github.com/apache/parquet-java/pull/3753/changes/3c15481fcd2aac30b706d5cf927c47bd43adb3b9



-- 
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]

Reply via email to