kevinjqliu commented on code in PR #3669:
URL: https://github.com/apache/parquet-java/pull/3669#discussion_r3605908975


##########
parquet-hadoop/src/main/java/org/apache/parquet/format/converter/ParquetMetadataConverter.java:
##########
@@ -1343,7 +1343,12 @@ LogicalTypeAnnotation 
getLogicalTypeAnnotation(ConvertedType type, SchemaElement
   }
 
   LogicalTypeAnnotation getLogicalTypeAnnotation(LogicalType type) {
-    switch (type.getSetField()) {
+    LogicalType._Fields setField = type.getSetField();
+    if (setField == null) {

Review Comment:
   It would and i wanted to do that, but unfortunately `switch` statement 
doesnt work with `null`
   
   > A switch statement is executed by first evaluating the Expression. If the 
Expression evaluates to null, a NullPointerException is thrown and the entire 
switch statement completes abruptly for that reason. Otherwise, if the result 
is of type Character, Byte, Short, or Integer, it is subject to unboxing 
conversion 
([ยง5.1.8](https://docs.oracle.com/javase/specs/jls/se11/html/jls-5.html#jls-5.1.8)).
   
    -- 
https://docs.oracle.com/javase/specs/jls/se11/html/jls-14.html#jls-SwitchStatement



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