-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-10623][SQL]: fix the predicate pushdown construction #8783
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Test build #42548 has finished for PR 8783 at commit
|
|
Test build #42554 has finished for PR 8783 at commit
|
|
@liancheng @marmbrus Can you help to review it? |
|
@zhzhan I just opened #8799, which is based on your PR. The reasons are:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use SQLTestUtils.withSQLConf instead.
|
@liancheng Thanks for review. Since #8799 is opened, which also fix another issue. I will close this one. |
When pushing down a leaf predicate, ORC `SearchArgument` builder requires an extra "parent" predicate (any one among `AND`/`OR`/`NOT`) to wrap the leaf predicate. E.g., to push down `a < 1`, we must build `AND(a < 1)` instead. Fortunately, when actually constructing the `SearchArgument`, the builder will eliminate all those unnecessary wrappers. This PR is based on #8783 authored by zhzhan. I also took the chance to simply `OrcFilters` a little bit to improve readability. Author: Cheng Lian <[email protected]> Closes #8799 from liancheng/spark-10623/fix-orc-ppd.
When pushing down a leaf predicate, ORC `SearchArgument` builder requires an extra "parent" predicate (any one among `AND`/`OR`/`NOT`) to wrap the leaf predicate. E.g., to push down `a < 1`, we must build `AND(a < 1)` instead. Fortunately, when actually constructing the `SearchArgument`, the builder will eliminate all those unnecessary wrappers. This PR is based on #8783 authored by zhzhan. I also took the chance to simply `OrcFilters` a little bit to improve readability. Author: Cheng Lian <[email protected]> Closes #8799 from liancheng/spark-10623/fix-orc-ppd. (cherry picked from commit 22be2ae) Signed-off-by: Yin Huai <[email protected]> Conflicts: sql/hive/src/main/scala/org/apache/spark/sql/hive/orc/OrcFilters.scala
The predicate pushdown is not working because the construction is wrong. Fix it with startAnd/end