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


##########
parquet-column/src/main/java/org/apache/parquet/schema/Types.java:
##########
@@ -426,8 +429,38 @@ public THIS columnOrder(ColumnOrder columnOrder) {
       return self();
     }
 
+    /**
+     * When set, an unsupported combination results in the logical type 
annotation being dropped
+     * rather than throwing. The associated statistics are also forcefully 
ignored by setting the
+     * column order to {@link ColumnOrderName#UNDEFINED}.
+     *
+     * @return this builder for method chaining
+     */
+    public THIS dropUnsupportedLogicalTypeCombinations() {
+      this.dropUnsupportedLogicalTypeCombinations = true;
+      return self();
+    }
+
     @Override
     protected PrimitiveType build(String name) {
+      try {
+        return validateAndBuild(name);
+      } catch (IllegalStateException e) {

Review Comment:
   it is possible to make this more specific?  Also there is a general spec 
question on whether we should error for clearly invalid types (e.g. decimal 
with a precision that is too high on ints).  This is probably also a spec level 
question.



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