Skip to content

[VL] Update Parquet unit tests - #12776

Open
rui-mo wants to merge 1 commit into
apache:mainfrom
rui-mo:wip_part_ut
Open

[VL] Update Parquet unit tests#12776
rui-mo wants to merge 1 commit into
apache:mainfrom
rui-mo:wip_part_ut

Conversation

@rui-mo

@rui-mo rui-mo commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

What changes are proposed in this pull request?

How was this patch tested?

Was this patch authored or co-authored using generative AI tooling?

Copilot AI lite review requested due to automatic review settings August 14, 2026 15:10
@github-actions github-actions Bot added the CORE works for Gluten Core label Aug 14, 2026
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 upstream ParquetColumnIndexSuite test coverage.
  • Updates Velox test selection (VeloxTestSettings) by removing/adjusting a number of excludes, and (in Spark 3.5) switching a couple of suites to include(...) 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")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CORE works for Gluten Core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants