houqp commented on pull request #792:
URL: https://github.com/apache/arrow-datafusion/pull/792#issuecomment-922048015


   Sorry for the delay @waynexia . I think going through all the schemas from 
the input tree is the right thing to do here. Filter and other plans like 
Projection should be able to access all fields from its full input query plan 
tree, not just the immediate query plan node. I do agree that we currently 
don't have a convenient way to access the full schema without asking the user 
to manually write a schema merge operation or changing the consumer code to 
work with the schema slice instead of merged schema. I think this ergonomics 
problem is something we can address in a separate PR. 
   
   On top of this, I think it would be beneficial to also reorder the optimizer 
run to run the filter push down before this optimization rule for a slight 
performance gain. But I think the subexpression elimination optimizer should 
work by itself too without having a hard dependency on the filter push down 
optimizer rule.


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


Reply via email to