openinx commented on a change in pull request #2465:
URL: https://github.com/apache/iceberg/pull/2465#discussion_r612908946
##########
File path: api/src/main/java/org/apache/iceberg/Schema.java
##########
@@ -46,34 +48,53 @@
*/
public class Schema implements Serializable {
private static final Joiner NEWLINE = Joiner.on('\n');
+ private static final Joiner COMMA = Joiner.on(',');
private static final String ALL_COLUMNS = "*";
private static final int DEFAULT_SCHEMA_ID = 0;
private final StructType struct;
private final int schemaId;
+ private final int[] identifierFieldIds;
+
private transient BiMap<String, Integer> aliasToId = null;
private transient Map<Integer, NestedField> idToField = null;
private transient Map<String, Integer> nameToId = null;
private transient Map<String, Integer> lowerCaseNameToId = null;
private transient Map<Integer, Accessor<StructLike>> idToAccessor = null;
private transient Map<Integer, String> idToName = null;
+ private transient Set<Integer> identifierFieldIdSet = null;
public Schema(List<NestedField> columns, Map<String, Integer> aliases) {
+ this(columns, aliases, ImmutableSet.of());
+ }
+
+ public Schema(List<NestedField> columns, Map<String, Integer> aliases,
Set<Integer> identifierFieldIds) {
Review comment:
Nit: Is it possible to reuse the construct logics from this
[constructor](https://github.com/apache/iceberg/pull/2465/files#diff-67561e1c7140f30c816a0934fa2f6beea66883a4b25b37b5cc9ca6b3cd034681R93)
?
--
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]