jackye1995 commented on a change in pull request #2354:
URL: https://github.com/apache/iceberg/pull/2354#discussion_r598211085



##########
File path: api/src/main/java/org/apache/iceberg/RowIdentifyField.java
##########
@@ -0,0 +1,75 @@
+/*
+ * 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.iceberg;
+
+import java.io.Serializable;
+import java.util.Objects;
+import org.apache.iceberg.exceptions.ValidationException;
+import org.apache.iceberg.types.Types;
+
+/**
+ * A field in {@link RowIdentifier}
+ * <p>
+ * The field must be:
+ *  1. a required column in the table schema
+ *  2. a primitive type column
+ */
+public class RowIdentifyField implements Serializable {

Review comment:
       the field only contains the source column id. Technically we can 
directly make `fields()` a `Integer[]`, but because this will be a public API, 
it will be hard to change in case we want to amend it in the future, so I 
decide to still have this separated class for the individual field information. 
This also aligns better with the structure of partition spec and sort order.
   
   In `SortOrder`, I see transform is also added as a part of the field, but it 
seems that only identity transform is permitted. It is the same situation here, 
so maybe we can also add transform here if anyone thinks there might be a use 
case of it.




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

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