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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindSink.java:
##########
@@ -457,6 +467,13 @@ private static Map<String, NamedExpression> 
getColumnToOutput(
                     } else {
                         continue;
                     }
+                } else if (icebergWriteSchemaContext.isPresent()) {
+                    Expression defaultExpression = 
icebergWriteSchemaContext.get().resolveWriteDefault(column);

Review Comment:
   [P1] Apply static partition values before resolving defaults
   
   Static partition columns are removed from `bindColumns`, so they have no 
child output here. This new branch therefore calls `resolveWriteDefault()` for 
them before the static aliases are installed below. For an externally authored 
Iceberg table with a required identity field `p` and no write default, `INSERT 
OVERWRITE ... PARTITION (p=7) SELECT ...` now fails with “Column has no write 
default and is required” even though the statement supplied `p`; the later 
override is never reached. Seed or exclude the static partition entries before 
omitted-column default synthesis, and cover a required identity field without a 
write default.



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