rdblue commented on a change in pull request #1399:
URL: https://github.com/apache/iceberg/pull/1399#discussion_r495269405
##########
File path: spark/src/main/java/org/apache/iceberg/spark/SparkTableUtil.java
##########
@@ -573,7 +574,8 @@ public static void importSparkPartitions(
int numShufflePartitions =
spark.sessionState().conf().numShufflePartitions();
MetricsConfig metricsConfig =
MetricsConfig.fromProperties(targetTable.properties());
String nameMappingString =
targetTable.properties().get(TableProperties.DEFAULT_NAME_MAPPING);
- NameMapping nameMapping = nameMappingString != null ?
NameMappingParser.fromJson(nameMappingString) : null;
+ NameMapping nameMapping = nameMappingString != null ?
+ NameMappingParser.fromJson(nameMappingString) :
MappingUtil.create(targetTable.schema());
Review comment:
That explains it. I thought that you were going to, so I was surprised.
----------------------------------------------------------------
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]