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


##########
parquet-avro/src/main/java/org/apache/parquet/avro/AvroSchemaConverter.java:
##########
@@ -538,7 +544,7 @@ public Optional<LogicalType> visit(
             LogicalTypeAnnotation.TimeUnit unit = 
timestampLogicalType.getUnit();
             boolean isAdjustedToUTC = timestampLogicalType.isAdjustedToUTC();
 
-            if (isAdjustedToUTC) {
+            if (isAdjustedToUTC || !avroVersionSupportsLocalTimestampTypes()) {

Review Comment:
   sorry for the confusion! changes to both methods should be needed; I've 
added test cases to `TestAvroSchemaConverter` that demonstrate the issue and 
fail without my changes to `AvroSchemaConverter` applied. Basically, we don't 
want to try to assign a logical type that doesn't exist in the user's Avro 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to