msaule commented on issue #21246:
URL: https://github.com/apache/datafusion/issues/21246#issuecomment-5149056807

   I reproduced this with a programmatically constructed physical plan. SQL is 
not a reproducer: DataFusion's SQL planner rejects duplicate projection 
expression names before it creates a physical plan. The failure occurs when a 
`ProjectionExec` exposes duplicate `id` aliases and a parent filter references 
one by physical index. The current pushdown path resolves the alias by name, so 
it can rewrite the filter to the other `id` source column.
   
   I have a focused patch and regression test that preserve the output column 
index while expanding projection aliases. It covers both duplicate `id` 
positions and verifies that each filter is rewritten to its own original input 
column. If programmatic physical plans are in scope for this rule, I can open 
the 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