github-actions[bot] commented on code in PR #63240:
URL: https://github.com/apache/doris/pull/63240#discussion_r3255348590


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java:
##########
@@ -4861,6 +4865,10 @@ public static void getDdlStmt(Command command, String 
dbName, TableIf table, Lis
             if (icebergExternalTable.hasSortOrder()) {
                 sb.append("\n").append(icebergExternalTable.getSortOrderSql());
             }
+            String partitionSpecSql = 
icebergExternalTable.getPartitionSpecSql();
+            if (!partitionSpecSql.isEmpty()) {

Review Comment:
   This also runs when `table` is an `IcebergSysExternalTable`, because the 
branch above replaces it with `((IcebergSysExternalTable) 
table).getSourceTable()`. The CREATE TABLE header and column list are still 
built from the system metadata table (for example `base$files`), but this new 
clause is taken from the source table and can reference source columns that do 
not exist in the metadata-table schema. For a partitioned source table, `SHOW 
CREATE TABLE base$files` would emit a non-replayable/mismatched DDL. Please 
skip source-table partition spec emission for `IcebergSysExternalTable`, or 
derive it from the actual system Iceberg table if system-table DDL is intended 
to include partitioning. The same issue exists in the earlier duplicated Env 
path added in this PR.



-- 
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]

Reply via email to