Fokko commented on code in PR #3699:
URL: https://github.com/apache/parquet-java/pull/3699#discussion_r3700084749


##########
parquet-column/src/main/java/org/apache/parquet/schema/MessageTypeParser.java:
##########
@@ -240,6 +246,26 @@ private static void addPrimitiveType(
     }
   }
 
+  private static ColumnOrder parseColumnOrder(String t, Tokenizer st) {
+    ColumnOrder.ColumnOrderName name;
+    try {
+      name = 
ColumnOrder.ColumnOrderName.valueOf(t.toUpperCase(Locale.ENGLISH));
+    } catch (IllegalArgumentException e) {
+      throw new IllegalArgumentException("Unknown column order: " + t + " at " 
+ st.getLocationString(), e);
+    }
+    switch (name) {
+      case UNDEFINED:
+        return ColumnOrder.undefined();
+      case TYPE_DEFINED_ORDER:
+        return ColumnOrder.typeDefined();
+      case IEEE_754_TOTAL_ORDER:
+        return ColumnOrder.ieee754TotalOrder();
+      default:
+        throw new IllegalArgumentException(
+            "Unsupported column order: " + name + " at " + 
st.getLocationString());

Review Comment:
   Should we throw here, or emit a null/unknown `ColumnOrder`?



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