aokolnychyi commented on a change in pull request #2984:
URL: https://github.com/apache/iceberg/pull/2984#discussion_r716841430
##########
File path:
mr/src/main/java/org/apache/iceberg/mr/mapreduce/IcebergInputFormat.java
##########
@@ -141,7 +144,7 @@
// TODO: We do not support residual evaluation for HIVE and PIG in
memory data model yet
checkResiduals(task);
}
- splits.add(new IcebergSplit(conf, task, table.io(),
table.encryption()));
+ splits.add(new IcebergSplit(SerializableTable.copyOf(table), conf,
task));
Review comment:
No longer applies, resolving.
##########
File path: core/src/main/java/org/apache/iceberg/MetadataColumns.java
##########
@@ -49,26 +54,40 @@ private MetadataColumns() {
public static final String DELETE_FILE_ROW_DOC = "Deleted row values";
private static final Map<String, NestedField> META_COLUMNS = ImmutableMap.of(
+ SPEC.name(), SPEC,
FILE_PATH.name(), FILE_PATH,
ROW_POSITION.name(), ROW_POSITION,
IS_DELETED.name(), IS_DELETED);
- private static final Set<Integer> META_IDS =
META_COLUMNS.values().stream().map(NestedField::fieldId)
- .collect(ImmutableSet.toImmutableSet());
+ private static final Set<Integer> META_IDS = ImmutableSet.of(
+ PARTITION_COLUMN_ID,
+ SPEC.fieldId(),
+ FILE_PATH.fieldId(),
+ ROW_POSITION.fieldId(),
+ IS_DELETED.fieldId()
+ );
public static Set<Integer> metadataFieldIds() {
return META_IDS;
}
- public static NestedField get(String name) {
- return META_COLUMNS.get(name);
+ public static NestedField metadataColumn(Table table, String name) {
+ if (name.equals(PARTITION_COLUMN_NAME)) {
+ return Types.NestedField.optional(
+ PARTITION_COLUMN_ID,
+ PARTITION_COLUMN_NAME,
+ Partitioning.partitionType(table),
+ PARTITION_COLUMN_DOC);
+ } else {
+ return META_COLUMNS.get(name);
+ }
}
public static boolean isMetadataColumn(String name) {
- return META_COLUMNS.containsKey(name);
+ return name.equals(PARTITION_COLUMN_NAME) ||
META_COLUMNS.containsKey(name);
}
public static boolean nonMetadataColumn(String name) {
- return !META_COLUMNS.containsKey(name);
+ return !name.equals(PARTITION_COLUMN_NAME) &&
!META_COLUMNS.containsKey(name);
Review comment:
Fixed.
##########
File path: core/src/main/java/org/apache/iceberg/MetadataColumns.java
##########
@@ -49,26 +54,40 @@ private MetadataColumns() {
public static final String DELETE_FILE_ROW_DOC = "Deleted row values";
private static final Map<String, NestedField> META_COLUMNS = ImmutableMap.of(
+ SPEC.name(), SPEC,
Review comment:
Fixed.
--
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]