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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindSink.java:
##########
@@ -816,6 +817,8 @@ private Plan 
bindIcebergTableSink(MatchingContext<UnboundIcebergTableSink<Plan>>
                     + "Expected " + boundSink.getCols().size() + " columns but 
got " + child.getOutput().size());
         }
 

Review Comment:
   [P1] Preserve Variant inputs before upstream coercion
   
   This check only sees the resolved child output types, so an upstream 
coercion can already have destroyed the Variant value. For example, `INSERT 
INTO iceberg_dst SELECT id, v FROM iceberg_src UNION ALL SELECT 2, 1` makes the 
UNION choose the numeric arm's type and inserts a Variant-V2-to-numeric cast. 
BE maps object/array Variant values in that cast to SQL NULL; this validator 
then accepts the numeric output as a supported source and the sink casts it 
back to Variant V2, committing NULL instead of the object. A user-authored 
conditional has the same ordering problem. Please propagate the Iceberg target 
into these branches or reject a source plan that has already coerced Variant to 
a scalar before validating 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]

Reply via email to