RussellSpitzer commented on code in PR #3711:
URL: https://github.com/apache/parquet-java/pull/3711#discussion_r3973164989


##########
parquet-column/src/test/java/org/apache/parquet/schema/TestTypeBuilders.java:
##########
@@ -1605,4 +1601,20 @@ public void 
testGeographyLogicalTypeWithoutEdgeInterpolationAlgorithm() {
         
Types.optional(BINARY).as(LogicalTypeAnnotation.geographyType()).named("aGeography");
     assertThat(optionalGeographyActual).isEqualTo(optionalGeographyExpected);
   }
+
+  @Test
+  public void testIgnoreUnsupportedLogicalAnnotations() {
+    LogicalTypeAnnotation[] annotations = {
+      LogicalTypeAnnotation.timestampType(true, MILLIS), 
LogicalTypeAnnotation.decimalType(2, 9)
+    };
+    for (LogicalTypeAnnotation annotation : annotations) {
+      PrimitiveType pt = Types.required(BOOLEAN)
+          .ignoreUnsupportedLogicalAnnotations()
+          .as(annotation)
+          .named("unsupported");
+      assertThat(pt.getPrimitiveTypeName()).isEqualTo(BOOLEAN);
+      assertThat(pt.getLogicalTypeAnnotation()).isNull();
+      
assertThat(pt.columnOrder().getColumnOrderName()).isEqualTo(ColumnOrder.ColumnOrderName.UNDEFINED);
+    }
+  }

Review Comment:
   Since we are still rejecting Decimals with bad precessions with a hard error 
(I think this is a good choice), we need a test to make sure that still happens 
when "ignoreUnsupportedLogicalAnnotations()" is used. 



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