Uh oh!
There was an error while loading. Please reload this page.
[SPARK-10339] [SPARK-10334] [SPARK-10301] [SQL]Partitioned table scan can OOM driver and throw a better error message when users need to enable parquet schema merging - #8515
Conversation
…d of create one Filter/Project for every partition.
There was a problem hiding this comment.
@liancheng@marmbrus I add the check to make sure the number of fields of a parquet file's struct have the same number of the corresponding struct in the table schema. If this check fails, we will ask users to enable mergeSchema.
…ields with the table schema.
marmbrus
commented
Aug 28, 2015
test this please |
There was a problem hiding this comment.
Just a note: this is a quick fix version of #8509.
SparkQA
commented
Aug 29, 2015
Test build #41770 has finished for PR 8515 at commit
|
SparkQA
commented
Aug 29, 2015
Test build #41771 has finished for PR 8515 at commit
|
liancheng
commented
Aug 29, 2015
Would be nice to have the following test case in test("SPARK-10334 Projections and filters should be kept in physical plan") {
withTempPath { dir =>valpath= dir.getCanonicalPath
sqlContext.range(2).select('id as 'a, 'id as 'b).write.partitionBy("b").parquet(path)
valdf= sqlContext.read.parquet(path).filter('a===0).select('b)
valphysicalPlan= df.queryExecution.executedPlan
assert(physicalPlan.collect { casep: execution.Project=> p }.length ===1)
assert(physicalPlan.collect { casep: execution.Filter=> p }.length ===1)
}
}And probably add Otherwise LGTM. Verified locally that filter push-down and column pruning both work properly. |
SparkQA
commented
Aug 29, 2015
Test build #41786 has finished for PR 8515 at commit
|
marmbrus
commented
Aug 29, 2015
Thanks, merging to master and branch-1.5. |
…n can OOM driver and throw a better error message when users need to enable parquet schema merging This fixes the problem that scanning partitioned table causes driver have a high memory pressure and takes down the cluster. Also, with this fix, we will be able to correctly show the query plan of a query consuming partitioned tables. https://issues.apache.org/jira/browse/SPARK-10339https://issues.apache.org/jira/browse/SPARK-10334 Finally, this PR squeeze in a "quick fix" for SPARK-10301. It is not a real fix, but it just throw a better error message to let user know what to do. Author: Yin Huai <yhuai@databricks.com> Closes#8515 from yhuai/partitionedTableScan. (cherry picked from commit 097a7e3) Signed-off-by: Michael Armbrust <michael@databricks.com>
…or nested structs We used to workaround SPARK-10301 with a quick fix in branch-1.5 (PR #8515), but it doesn't cover the case described in SPARK-10428. So this PR backports PR #8509, which had once been considered too big a change to be merged into branch-1.5 in the last minute, to fix both SPARK-10301 and SPARK-10428 for Spark 1.5. Also added more test cases for SPARK-10428. This PR looks big, but the essential change is only ~200 loc. All other changes are for testing. Especially, PR #8454 is also backported here because the `ParquetInteroperabilitySuite` introduced in PR #8515 depends on it. This should be safe since #8454 only touches testing code. Author: Cheng Lian <lian@databricks.com> Closes#8583 from liancheng/spark-10301/for-1.5.
…or nested structs We used to workaround SPARK-10301 with a quick fix in branch-1.5 (PR apache#8515), but it doesn't cover the case described in SPARK-10428. So this PR backports PR apache#8509, which had once been considered too big a change to be merged into branch-1.5 in the last minute, to fix both SPARK-10301 and SPARK-10428 for Spark 1.5. Also added more test cases for SPARK-10428. This PR looks big, but the essential change is only ~200 loc. All other changes are for testing. Especially, PR apache#8454 is also backported here because the `ParquetInteroperabilitySuite` introduced in PR apache#8515 depends on it. This should be safe since apache#8454 only touches testing code. Author: Cheng Lian <lian@databricks.com> Closesapache#8583 from liancheng/spark-10301/for-1.5. (cherry picked from commit fca16c5) Conflicts: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/CatalystReadSupport.scala
This fixes the problem that scanning partitioned table causes driver have a high memory pressure and takes down the cluster. Also, with this fix, we will be able to correctly show the query plan of a query consuming partitioned tables.
https://issues.apache.org/jira/browse/SPARK-10339
https://issues.apache.org/jira/browse/SPARK-10334
Finally, this PR squeeze in a "quick fix" for SPARK-10301. It is not a real fix, but it just throw a better error message to let user know what to do.