Skip to content

Commit

Permalink
fix: Spark 4.0-preview1 SPARK-47120
Browse files Browse the repository at this point in the history
  • Loading branch information
kazuyukitanimura committed Dec 10, 2024
1 parent 73f1405 commit 8bd813f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 18 deletions.
16 changes: 3 additions & 13 deletions dev/diffs/4.0.0-preview1.diff
Original file line number Diff line number Diff line change
Expand Up @@ -2088,7 +2088,7 @@ index cd6f41b4ef4..4b6a17344bc 100644
ParquetOutputFormat.WRITER_VERSION -> ParquetProperties.WriterVersion.PARQUET_2_0.toString
)
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFilterSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFilterSuite.scala
index 795e9f46a8d..6285a1e388b 100644
index 795e9f46a8d..5306c94a686 100644
--- a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFilterSuite.scala
+++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFilterSuite.scala
@@ -1100,7 +1100,11 @@ abstract class ParquetFilterSuite extends QueryTest with ParquetTest with Shared
Expand Down Expand Up @@ -2150,17 +2150,7 @@ index 795e9f46a8d..6285a1e388b 100644
// block 1:
// null count min max
// page-0 0 0 99
@@ -2211,7 +2225,8 @@ abstract class ParquetFilterSuite extends QueryTest with ParquetTest with Shared
}
}

- test("SPARK-47120: subquery literal filter pushdown") {
+ test("SPARK-47120: subquery literal filter pushdown",
+ IgnoreComet("TODO: https://github.com/apache/datafusion-comet/issues/551")) {
withTable("t1", "t2") {
sql("create table t1(d date) using parquet")
sql("create table t2(d date) using parquet")
@@ -2301,7 +2316,11 @@ class ParquetV1FilterSuite extends ParquetFilterSuite {
@@ -2301,7 +2315,11 @@ class ParquetV1FilterSuite extends ParquetFilterSuite {
assert(pushedParquetFilters.exists(_.getClass === filterClass),
s"${pushedParquetFilters.map(_.getClass).toList} did not contain ${filterClass}.")

Expand All @@ -2173,7 +2163,7 @@ index 795e9f46a8d..6285a1e388b 100644
} else {
assert(selectedFilters.isEmpty, "There is filter pushed down")
}
@@ -2362,7 +2381,11 @@ class ParquetV2FilterSuite extends ParquetFilterSuite {
@@ -2362,7 +2380,11 @@ class ParquetV2FilterSuite extends ParquetFilterSuite {
assert(pushedParquetFilters.exists(_.getClass === filterClass),
s"${pushedParquetFilters.map(_.getClass).toList} did not contain ${filterClass}.")

Expand Down
2 changes: 1 addition & 1 deletion docs/source/user-guide/source.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Official source releases can be downloaded from https://dist.apache.org/repos/di

```console
# Pick the latest version
export COMET_VERSION=0.3.0
export COMET_VERSION=0.4.0
# Download the tarball
curl -O "https://dist.apache.org/repos/dist/release/datafusion/datafusion-comet-$COMET_VERSION/apache-datafusion-comet-$COMET_VERSION.tar.gz"
# Unpack
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -723,20 +723,22 @@ class ParquetFilters(
.lift(nameToParquetField(name).fieldType)
.map(_(nameToParquetField(name).fieldNames, value))

case sources.LessThan(name, value) if canMakeFilterOn(name, value) =>
case sources.LessThan(name, value) if (value != null) && canMakeFilterOn(name, value) =>
makeLt
.lift(nameToParquetField(name).fieldType)
.map(_(nameToParquetField(name).fieldNames, value))
case sources.LessThanOrEqual(name, value) if canMakeFilterOn(name, value) =>
case sources.LessThanOrEqual(name, value)
if (value != null) && canMakeFilterOn(name, value) =>
makeLtEq
.lift(nameToParquetField(name).fieldType)
.map(_(nameToParquetField(name).fieldNames, value))

case sources.GreaterThan(name, value) if canMakeFilterOn(name, value) =>
case sources.GreaterThan(name, value) if (value != null) && canMakeFilterOn(name, value) =>
makeGt
.lift(nameToParquetField(name).fieldType)
.map(_(nameToParquetField(name).fieldNames, value))
case sources.GreaterThanOrEqual(name, value) if canMakeFilterOn(name, value) =>
case sources.GreaterThanOrEqual(name, value)
if (value != null) && canMakeFilterOn(name, value) =>
makeGtEq
.lift(nameToParquetField(name).fieldType)
.map(_(nameToParquetField(name).fieldNames, value))
Expand Down

0 comments on commit 8bd813f

Please sign in to comment.