danny0405 commented on code in PR #14265:
URL: https://github.com/apache/hudi/pull/14265#discussion_r2540260554


##########
hudi-common/src/main/java/org/apache/hudi/common/schema/HoodieFieldOrder.java:
##########
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hudi.common.schema;
+
+import org.apache.avro.Schema;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Enumeration of field sort orders supported by Hudi schema system.
+ *
+ * <p>This enum wraps Avro's Schema.Field.Order to provide a consistent 
interface
+ * for field ordering while maintaining binary compatibility with Avro.</p>
+ *
+ * @since 1.2.0
+ */
+public enum HoodieFieldOrder {

Review Comment:
   If we want to inherit the notions from Avro, I prefer to put it as per field 
value, while I checked the definition of Iceberg 
[`NestedField`](https://github.com/apache/iceberg/blob/b6b89268de26b119817db9ce20b540baa349c541/api/src/main/java/org/apache/iceberg/types/Types.java#L862),
 there is no ordering definition:
   
   ```java
   private NestedField(
           boolean isOptional,
           int id,
           String name,
           Type type,
           String doc,
           Object initialDefault,
           Object writeDefault) {
   ```
   
   If we have no usage of it, maybe we just simplify the `Field` abstraction to 
drop it from our impl and just put a default value when converted to Avro, and 
add it back if we have a real use case there.



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

Reply via email to