[VL] Update Parquet unit tests - #12776
Open
rui-mo wants to merge 1 commit into
Open
Conversation
|
Run Gluten Clickhouse CI on x86 |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Velox-backed Parquet unit test coverage across Spark 3.3–4.1 shims by removing some Gluten-specific rewrites and adjusting which Spark Parquet tests are enabled/disabled via VeloxTestSettings.
Changes:
- Removes Gluten-specific Parquet filter tests for timestamp/date pushdown in multiple Spark shim suites.
- Simplifies
GlutenParquetColumnIndexSuite(Spark 3.3–3.5) to rely on the upstreamParquetColumnIndexSuitetest coverage. - Updates Velox test selection (
VeloxTestSettings) by removing/adjusting a number of excludes, and (in Spark 3.5) switching a couple of suites toinclude(...)mode.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| gluten-ut/spark41/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/GlutenParquetFilterSuite.scala | Removes Gluten-added timestamp pushdown test and nested date pushdown coverage. |
| gluten-ut/spark41/src/test/scala/org/apache/gluten/utils/velox/VeloxTestSettings.scala | Updates Velox Parquet test exclusions (enables previously excluded cases). |
| gluten-ut/spark40/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/GlutenParquetFilterSuite.scala | Removes Gluten-added timestamp pushdown test and nested date pushdown coverage. |
| gluten-ut/spark40/src/test/scala/org/apache/gluten/utils/velox/VeloxTestSettings.scala | Updates Velox Parquet test exclusions (enables previously excluded cases). |
| gluten-ut/spark35/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/GlutenParquetFilterSuite.scala | Removes unused timestamp/date pushdown rewrites and trims imports accordingly. |
| gluten-ut/spark35/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/GlutenParquetColumnIndexSuite.scala | Drops rewritten unaligned-page tests and defers to upstream suite. |
| gluten-ut/spark35/src/test/scala/org/apache/gluten/utils/velox/VeloxTestSettings.scala | Adjusts Velox Parquet suite filters and changes two suites to include(...) mode. |
| gluten-ut/spark34/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/GlutenParquetFilterSuite.scala | Removes Gluten-added timestamp pushdown test and nested date pushdown coverage. |
| gluten-ut/spark34/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/GlutenParquetColumnIndexSuite.scala | Drops rewritten unaligned-page tests and defers to upstream suite. |
| gluten-ut/spark34/src/test/scala/org/apache/gluten/utils/velox/VeloxTestSettings.scala | Updates Velox Parquet test exclusions (enables previously excluded cases). |
| gluten-ut/spark33/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/GlutenParquetFilterSuite.scala | Removes Gluten-added timestamp pushdown test and nested date pushdown coverage. |
| gluten-ut/spark33/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/GlutenParquetColumnIndexSuite.scala | Drops rewritten unaligned-page tests and defers to upstream suite. |
| gluten-ut/spark33/src/test/scala/org/apache/gluten/utils/velox/VeloxTestSettings.scala | Updates Velox Parquet test exclusions (enables previously excluded cases). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
66
to
71
| override protected def readResourceParquetFile(name: String): DataFrame = { | ||
| spark.read.parquet( | ||
| getWorkspaceFilePath("sql", "core", "src", "test", "resources").toString + "/" + name) | ||
| } | ||
|
|
||
| testGluten("filter pushdown - timestamp") { | ||
| Seq(true, false).foreach { | ||
| java8Api => | ||
| Seq(CORRECTED, LEGACY).foreach { | ||
| rebaseMode => | ||
| val millisData = Seq( | ||
| "1000-06-14 08:28:53.123", | ||
| "1582-06-15 08:28:53.001", | ||
| "1900-06-16 08:28:53.0", | ||
| "2018-06-17 08:28:53.999") | ||
| // INT96 doesn't support pushdown | ||
| withSQLConf( | ||
| SQLConf.DATETIME_JAVA8API_ENABLED.key -> java8Api.toString, | ||
| SQLConf.PARQUET_INT96_REBASE_MODE_IN_WRITE.key -> rebaseMode.toString, | ||
| SQLConf.PARQUET_OUTPUT_TIMESTAMP_TYPE.key -> INT96.toString | ||
| ) { | ||
| import testImplicits._ | ||
| withTempPath { | ||
| file => | ||
| millisData | ||
| .map(i => Tuple1(Timestamp.valueOf(i))) | ||
| .toDF | ||
| .write | ||
| .format(dataSourceName) | ||
| .save(file.getCanonicalPath) | ||
| readParquetFile(file.getCanonicalPath) { | ||
| df => | ||
| val schema = new SparkToParquetSchemaConverter(conf).convert(df.schema) | ||
| assertResult(None) { | ||
| createParquetFilters(schema).createFilter(sources.IsNull("_1")) | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| testGluten("SPARK-12218: 'Not' is included in Parquet filter pushdown") { |
Comment on lines
64
to
69
| } | ||
|
|
||
| override protected def readResourceParquetFile(name: String): DataFrame = { | ||
| spark.read.parquet( | ||
| getWorkspaceFilePath("sql", "core", "src", "test", "resources").toString + "/" + name) | ||
| } |
Comment on lines
66
to
71
| getWorkspaceFilePath("sql", "core", "src", "test", "resources").toString + "/" + name) | ||
| } | ||
|
|
||
| testGluten("filter pushdown - timestamp") { | ||
| Seq(true, false).foreach { | ||
| java8Api => | ||
| Seq(CORRECTED, LEGACY).foreach { | ||
| rebaseMode => | ||
| val millisData = Seq( | ||
| "1000-06-14 08:28:53.123", | ||
| "1582-06-15 08:28:53.001", | ||
| "1900-06-16 08:28:53.0", | ||
| "2018-06-17 08:28:53.999") | ||
| // INT96 doesn't support pushdown | ||
| withSQLConf( | ||
| SQLConf.DATETIME_JAVA8API_ENABLED.key -> java8Api.toString, | ||
| SQLConf.PARQUET_INT96_REBASE_MODE_IN_WRITE.key -> rebaseMode.toString, | ||
| SQLConf.PARQUET_OUTPUT_TIMESTAMP_TYPE.key -> INT96.toString | ||
| ) { | ||
| import testImplicits._ | ||
| withTempPath { | ||
| file => | ||
| millisData | ||
| .map(i => Tuple1(Timestamp.valueOf(i))) | ||
| .toDF | ||
| .write | ||
| .format(dataSourceName) | ||
| .save(file.getCanonicalPath) | ||
| readParquetFile(file.getCanonicalPath) { | ||
| df => | ||
| val schema = new SparkToParquetSchemaConverter(conf).convert(df.schema) | ||
| assertResult(None) { | ||
| createParquetFilters(schema).createFilter(sources.IsNull("_1")) | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| testGluten("SPARK-12218: 'Not' is included in Parquet filter pushdown") { | ||
| import testImplicits._ | ||
|
|
Comment on lines
66
to
71
| spark.read.parquet( | ||
| getWorkspaceFilePath("sql", "core", "src", "test", "resources").toString + "/" + name) | ||
| } | ||
|
|
||
| testGluten("filter pushdown - timestamp") { | ||
| Seq(true, false).foreach { | ||
| java8Api => | ||
| Seq(CORRECTED, LEGACY).foreach { | ||
| rebaseMode => | ||
| val millisData = Seq( | ||
| "1000-06-14 08:28:53.123", | ||
| "1582-06-15 08:28:53.001", | ||
| "1900-06-16 08:28:53.0", | ||
| "2018-06-17 08:28:53.999") | ||
| // INT96 doesn't support pushdown | ||
| withSQLConf( | ||
| SQLConf.DATETIME_JAVA8API_ENABLED.key -> java8Api.toString, | ||
| SQLConf.PARQUET_INT96_REBASE_MODE_IN_WRITE.key -> rebaseMode.toString, | ||
| SQLConf.PARQUET_OUTPUT_TIMESTAMP_TYPE.key -> INT96.toString | ||
| ) { | ||
| import testImplicits._ | ||
| withTempPath { | ||
| file => | ||
| millisData | ||
| .map(i => Tuple1(Timestamp.valueOf(i))) | ||
| .toDF | ||
| .write | ||
| .format(dataSourceName) | ||
| .save(file.getCanonicalPath) | ||
| readParquetFile(file.getCanonicalPath) { | ||
| df => | ||
| val schema = new SparkToParquetSchemaConverter(conf).convert(df.schema) | ||
| assertResult(None) { | ||
| createParquetFilters(schema).createFilter(sources.IsNull("_1")) | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| testGluten("SPARK-12218: 'Not' is included in Parquet filter pushdown") { | ||
| import testImplicits._ |
Comment on lines
389
to
+390
| enableSuite[GlutenParquetInteroperabilitySuite] | ||
| .exclude("parquet timestamp conversion") | ||
| .include("parquet timestamp conversion") |
Comment on lines
471
to
+473
| enableSuite[GlutenParquetV2AggregatePushDownSuite] | ||
| // TODO: Timestamp columns stats will lost if using int64 in parquet writer. | ||
| .exclude("aggregate push down - different data types") | ||
| .include("aggregate push down - different data types") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes are proposed in this pull request?
How was this patch tested?
Was this patch authored or co-authored using generative AI tooling?