liamzwbao commented on code in PR #13392:
URL: https://github.com/apache/iceberg/pull/13392#discussion_r2167843681


##########
flink/v1.20/flink/src/main/java/org/apache/iceberg/flink/sink/IcebergSinkBuilder.java:
##########
@@ -40,8 +41,14 @@
 @Internal
 interface IcebergSinkBuilder<T extends IcebergSinkBuilder<?>> {

Review Comment:
   1.19 does not have this Builder so no changes are made there



##########
flink/v1.19/flink/src/main/java/org/apache/iceberg/flink/FlinkCatalog.java:
##########
@@ -672,15 +658,15 @@ private static List<String> toPartitionKeys(PartitionSpec 
spec, Schema icebergSc
   }
 
   static CatalogTable toCatalogTableWithProps(Table table, Map<String, String> 
props) {
-    TableSchema schema = FlinkSchemaUtil.toSchema(table.schema());
+    ResolvedSchema resolvedSchema = 
FlinkSchemaUtil.toResolvedSchema(table.schema());
     List<String> partitionKeys = toPartitionKeys(table.spec(), table.schema());
 
     // NOTE: We can not create a IcebergCatalogTable extends CatalogTable, 
because Flink optimizer
-    // may use
-    // CatalogTableImpl to copy a new catalog table.
+    // may use CatalogTableImpl to copy a new catalog table.
     // Let's re-loading table from Iceberg catalog when creating source/sink 
operators.
     // Iceberg does not have Table comment, so pass a null (Default comment 
value in Flink).
-    return new CatalogTableImpl(schema, partitionKeys, props, null);
+    return new CatalogTableImpl(
+        TableSchema.fromResolvedSchema(resolvedSchema), partitionKeys, props, 
null);
   }

Review Comment:
   1.19 does not support `CatalogTable.newBuilder()` so the legacy 
`CatalogTableImpl` is still being used here



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to