[SPARK-10623] [SQL] Fixes ORC predicate push-down#8799
[SPARK-10623] [SQL] Fixes ORC predicate push-down#8799liancheng wants to merge 3 commits intoapache:masterfrom
Conversation
There was a problem hiding this comment.
The in(attribute, _) part is wrong, because in accepts varargs instead of a list.
|
Test build #42613 has finished for PR 8799 at commit
|
|
Test build #42625 has finished for PR 8799 at commit
|
|
LGTM Thanks for fixing this. |
There was a problem hiding this comment.
Will this In get changed toInSet by the optimizer when all values are literals?
There was a problem hiding this comment.
This is a sources.In rather than expressions.In, so it should be fine.
|
two comments. Otherwise, looks good. |
|
Test build #42688 has finished for PR 8799 at commit
|
There was a problem hiding this comment.
Does this test check if the predicate is really pushded down? Or it just check answers?
There was a problem hiding this comment.
It just checks answers. It's annoying that I couldn't find a programmatical way to verify whether its pushed down or not. Checked through logs manually though.
|
ok. Merging to master and branch 1.5. |
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 <lian@databricks.com> Closes #8799 from liancheng/spark-10623/fix-orc-ppd. (cherry picked from commit 22be2ae) Signed-off-by: Yin Huai <yhuai@databricks.com> Conflicts: sql/hive/src/main/scala/org/apache/spark/sql/hive/orc/OrcFilters.scala
When pushing down a leaf predicate, ORC
SearchArgumentbuilder requires an extra "parent" predicate (any one amongAND/OR/NOT) to wrap the leaf predicate. E.g., to push downa < 1, we must buildAND(a < 1)instead. Fortunately, when actually constructing theSearchArgument, the builder will eliminate all those unnecessary wrappers.This PR is based on #8783 authored by @zhzhan. I also took the chance to simply
OrcFiltersa little bit to improve readability.