kosiew commented on code in PR #26969:
URL: https://github.com/apache/datafusion/pull/26969#discussion_r4731624270


##########
datafusion/optimizer/src/extract_leaf_expressions.rs:
##########
@@ -1049,8 +1141,23 @@ fn split_and_push_projection(
             recovery_exprs.push(expr.clone());
             proj_exprs_captured += 1;
         } else if let Expr::Alias(alias) = expr
-            && alias.name.starts_with(EXTRACTED_EXPR_PREFIX)
+            && is_extracted_alias(alias)
         {
+            if input_schema.has_column_with_unqualified_name(&alias.name) {
+                let transformed = routing_extract(

Review Comment:
   The retry can allocate an alias that collides with a deeper schema field, 
causing an ambiguity error. Please check destination bindings for both fresh 
and carried aliases, decline conflicting moves, and add nested regression tests 
covering both paths.



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