You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by gatorsmile <gi...@git.apache.org> on 2017/10/21 07:09:17 UTC
[GitHub] spark pull request #19547: [SPARK-20331][SQL][FOLLOW-UP] Add a SQLConf for e...
GitHub user gatorsmile opened a pull request:
https://github.com/apache/spark/pull/19547
[SPARK-20331][SQL][FOLLOW-UP] Add a SQLConf for enhanced Hive partition pruning predicate pushdown
## What changes were proposed in this pull request?
This is a follow-up PR of https://github.com/apache/spark/pull/17633.
This PR is to add a conf `spark.sql.hive.advancedPartitionPredicatePushdown.enabled`, which can be used to turn the enhancement off.
## How was this patch tested?
Add a test case
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/gatorsmile/spark Spark20331FollowUp
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/19547.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #19547
----
commit 40576020301e551dc0c66375b00a5fcc150e9ab7
Author: gatorsmile <ga...@gmail.com>
Date: 2017-10-21T06:56:30Z
fix.
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #19547: [SPARK-20331][SQL][FOLLOW-UP] Add a SQLConf for e...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/spark/pull/19547
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #19547: [SPARK-20331][SQL][FOLLOW-UP] Add a SQLConf for enhanced...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/19547
Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/82944/
Test PASSed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #19547: [SPARK-20331][SQL][FOLLOW-UP] Add a SQLConf for enhanced...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/19547
**[Test build #82944 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/82944/testReport)** for PR 19547 at commit [`4057602`](https://github.com/apache/spark/commit/40576020301e551dc0c66375b00a5fcc150e9ab7).
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #19547: [SPARK-20331][SQL][FOLLOW-UP] Add a SQLConf for enhanced...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/19547
Merged build finished. Test PASSed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #19547: [SPARK-20331][SQL][FOLLOW-UP] Add a SQLConf for enhanced...
Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on the issue:
https://github.com/apache/spark/pull/19547
Thanks! Merged to master.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #19547: [SPARK-20331][SQL][FOLLOW-UP] Add a SQLConf for enhanced...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/19547
**[Test build #82944 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/82944/testReport)** for PR 19547 at commit [`4057602`](https://github.com/apache/spark/commit/40576020301e551dc0c66375b00a5fcc150e9ab7).
* This patch passes all tests.
* This patch merges cleanly.
* This patch adds no public classes.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #19547: [SPARK-20331][SQL][FOLLOW-UP] Add a SQLConf for e...
Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on a diff in the pull request:
https://github.com/apache/spark/pull/19547#discussion_r146109395
--- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveShim.scala ---
@@ -585,6 +585,35 @@ private[client] class Shim_v0_13 extends Shim_v0_12 {
* Unsupported predicates are skipped.
*/
def convertFilters(table: Table, filters: Seq[Expression]): String = {
+ if (SQLConf.get.advancedPartitionPredicatePushdownEnabled) {
+ convertComplexFilters(table, filters)
+ } else {
+ convertBasicFilters(table, filters)
+ }
--- End diff --
Nit, Can we remove the duplication of `varcharKeys` logic by moving into `convertFilters` like the following?
```scala
def convertFilters(table: Table, filters: Seq[Expression]): String = {
// hive varchar is treated as catalyst string, but hive varchar can't be pushed down.
lazy val varcharKeys = table.getPartitionKeys.asScala
.filter(col => col.getType.startsWith(serdeConstants.VARCHAR_TYPE_NAME) ||
col.getType.startsWith(serdeConstants.CHAR_TYPE_NAME))
.map(col => col.getName).toSet
if (SQLConf.get.advancedPartitionPredicatePushdownEnabled) {
convertComplexFilters(table, filters, varcharKeys)
} else {
convertBasicFilters(table, filters, varcharKeys)
}
}
```
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #19547: [SPARK-20331][SQL][FOLLOW-UP] Add a SQLConf for e...
Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/19547#discussion_r146110223
--- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveShim.scala ---
@@ -585,6 +585,35 @@ private[client] class Shim_v0_13 extends Shim_v0_12 {
* Unsupported predicates are skipped.
*/
def convertFilters(table: Table, filters: Seq[Expression]): String = {
+ if (SQLConf.get.advancedPartitionPredicatePushdownEnabled) {
+ convertComplexFilters(table, filters)
+ } else {
+ convertBasicFilters(table, filters)
+ }
--- End diff --
Thanks! We can do it when enhancing `convertComplexFilters `. Here, it is just to keep the original codes (from Spark 2.2) untouched.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org