Skip to content

Conversation

@gengliangwang
Copy link
Member

@gengliangwang gengliangwang commented Oct 10, 2018

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
Member Author

@dbtsai @gatorsmile

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

// Safely remove unsupported `StringContains` predicate and push down `LessThan`
Copy link
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

SparkQA commented Oct 10, 2018

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

SparkQA commented Oct 10, 2018

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)
Copy link
Member

@dbtsai dbtsai Oct 10, 2018

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
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
Member Author

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

dbtsai commented Oct 10, 2018

LGTM. Just some styling feedback. Thanks.

@dbtsai
Copy link
Member

dbtsai commented Oct 10, 2018

Merged into master. Thanks.

@asfgit asfgit closed this in 6df2345 Oct 10, 2018
@SparkQA
Copy link

SparkQA commented Oct 10, 2018

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.

Closes apache#22684 from gengliangwang/pushOrcFilters.

Authored-by: Gengliang Wang <gengliang.wang@databricks.com>
Signed-off-by: DB Tsai <d_tsai@apple.com>
Sign up for free to 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