Github user chenghao-intel commented on the pull request:
https://github.com/apache/spark/pull/3778#issuecomment-68119210
This is really a very useful optimization, particularly for those SQLs
generated by machines. And it would make more senses if we add unit test to
reflect the expression optimization will eventually change the behavior of
logical plan optimization (Cartesian join ==> hash join). e.g. in
https://github.com/apache/spark/blob/master/sql/core/src/test/scala/org/apache/spark/sql/JoinSuite.scala#L62
In the meantime, I think the code can be polished as more functional style
(e.g. Remove the implicit classes and avoid using the unnecessary trait
etc. ), as you know, most of the optimizing rules in Catalyst are
straightforward and brief, which is easier to be maintained and extended for
the others.
Sorry that I didn't dive into the details.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]