szehon-ho commented on code in PR #18250:
URL: https://github.com/apache/iceberg/pull/18250#discussion_r4109630215
##########
spark/v4.2/spark/src/main/java/org/apache/iceberg/spark/SparkCatalog.java:
##########
@@ -259,15 +255,15 @@ public StagedTable stageReplace(
}
@Override
- public StagedTable stageCreateOrReplace(
- Identifier ident, StructType schema, Transform[] transforms, Map<String,
String> properties) {
- Schema icebergSchema = SparkSchemaUtil.convert(schema);
+ public StagedTable stageCreateOrReplace(Identifier ident, TableInfo
tableInfo)
+ throws NoSuchNamespaceException {
+ Schema icebergSchema = SparkSchemaUtil.convert(tableInfo.schema());
Review Comment:
We should preserve defaults explicitly declared in `REPLACE TABLE` and
`CREATE OR REPLACE TABLE` (I checked the Spark side).
Both replacement methods currently use schema-only conversion, so they
silently loses their default.
We should use convert(tableInfo) to keep 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.
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]