Skip to content

[SPARK-25699][SQL] Partially push down conjunctive predicated in ORC - #22684

Closed
gengliangwang wants to merge 5 commits into
apache:masterfrom
gengliangwang:pushOrcFilters
Closed

[SPARK-25699][SQL] Partially push down conjunctive predicated in ORC#22684
gengliangwang wants to merge 5 commits into
apache:masterfrom
gengliangwang:pushOrcFilters

Conversation

@gengliangwang

@gengliangwanggengliangwang commented Oct 10, 2018

Copy link
Copy Markdown
Member

What changes were proposed in this pull request?

Inspired by #22574 .
We can partially push down top level conjunctive predicates to Orc.
This PR improves Orc predicate push down in both SQL and Hive module.

How was this patch tested?

New unit test.

@gengliangwang

Copy link
Copy Markdown
MemberAuthor

@dbtsai@gatorsmile

@gengliangwanggengliangwang changed the title [SPARK-25699][SQL] Partially push down conjunctive predicated in Orc[SPARK-25699][SQL] Partially push down conjunctive predicated in ORCOct 10, 2018
)).get.toString
}

// Safely remove unsupported `StringContains` predicate and push down `LessThan`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is another predicate pushed down. We shall mention it too?

@SparkQA

Copy link
Copy Markdown

Test build #97187 has finished for PR 22684 at commit 28322b2.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA

Copy link
Copy Markdown

Test build #97199 has finished for PR 22684 at commit c2eb87a.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

val leftBuilderOption = createBuilder(dataTypeMap, left,
newBuilder, canPartialPushDownConjuncts)
val rightBuilderOption =
createBuilder(dataTypeMap, right, newBuilder, canPartialPushDownConjuncts)

@dbtsaidbtsaiOct 10, 2018

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit, can you make the format the same as leftBuilderOption? Also, add another empty line before (leftBuilderOption, rightBuilderOption). Thanks.

_ <- buildSearchArgument(dataTypeMap, child, newBuilder)
negate <- buildSearchArgument(dataTypeMap, child, builder.startNot())
_ <- createBuilder(dataTypeMap, child, newBuilder, canPartialPushDownConjuncts = false)
negate <- createBuilder(dataTypeMap, child, builder.startNot(), false)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit, can you explicitly call canPartialPushDownConjuncts = false?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then it has to be two lines..I am OK with that too.

newBuilder, canPartialPushDownConjuncts)
val rightBuilderOption =
createBuilder(dataTypeMap, right, newBuilder, canPartialPushDownConjuncts)
(leftBuilderOption, rightBuilderOption) match {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

_ <- buildSearchArgument(dataTypeMap, child, newBuilder)
negate <- buildSearchArgument(dataTypeMap, child, builder.startNot())
_ <- createBuilder(dataTypeMap, child, newBuilder, canPartialPushDownConjuncts = false)
negate <- createBuilder(dataTypeMap, child, builder.startNot(), false)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@dbtsai

Copy link
Copy Markdown
Member

LGTM. Just some styling feedback. Thanks.

@dbtsai

Copy link
Copy Markdown
Member

Merged into master. Thanks.

@SparkQA

Copy link
Copy Markdown

Test build #97209 has finished for PR 22684 at commit 9d9ed2f.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

jackylee-ch pushed a commit to jackylee-ch/spark that referenced this pull request Feb 18, 2019
## What changes were proposed in this pull request?
Inspired by apache#22574 .
We can partially push down top level conjunctive predicates to Orc.
This PR improves Orc predicate push down in both SQL and Hive module.
## How was this patch tested?
New unit test.
Closesapache#22684 from gengliangwang/pushOrcFilters.
Authored-by: Gengliang Wang <gengliang.wang@databricks.com>
Signed-off-by: DB Tsai <d_tsai@apple.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@gengliangwang@SparkQA@dbtsai@viirya