Skip to content

Commit dc08a96

Browse files
authored
fix: complete native_datafusion Parquet schema-mismatch rejections (apache#4229)
1 parent 32126c9 commit dc08a96

18 files changed

Lines changed: 1274 additions & 413 deletions

File tree

common/src/main/java/org/apache/comet/parquet/AbstractColumnReader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public void close() {
128128

129129
protected void initNative() {
130130
LOG.debug("initializing the native column reader");
131-
DataType readType = (boolean) CometConf.COMET_SCHEMA_EVOLUTION_ENABLED().get() ? type : null;
131+
DataType readType = CometConf.COMET_SCHEMA_EVOLUTION_ENABLED() ? type : null;
132132
boolean useLegacyDateTimestampOrNTZ =
133133
useLegacyDateTimestamp || type == TimestampNTZType$.MODULE$;
134134
nativeHandle =

common/src/main/java/org/apache/comet/parquet/TypeUtil.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public static void checkParquetType(ColumnDescriptor descriptor, DataType sparkT
130130
PrimitiveType.PrimitiveTypeName typeName = descriptor.getPrimitiveType().getPrimitiveTypeName();
131131
LogicalTypeAnnotation logicalTypeAnnotation =
132132
descriptor.getPrimitiveType().getLogicalTypeAnnotation();
133-
boolean allowTypePromotion = (boolean) CometConf.COMET_SCHEMA_EVOLUTION_ENABLED().get();
133+
boolean allowTypePromotion = CometConf.COMET_SCHEMA_EVOLUTION_ENABLED();
134134

135135
if (sparkType instanceof NullType) {
136136
return;
@@ -150,8 +150,8 @@ && isUnsignedIntTypeMatched(logicalTypeAnnotation, 32)) {
150150
// fallbacks. We read them as long values.
151151
return;
152152
} else if (sparkType == DataTypes.LongType && allowTypePromotion) {
153-
// In Comet we allow schema evolution from int to long, if
154-
// `spark.comet.schemaEvolution.enabled` is enabled.
153+
// INT32 -> LONG widening is allowed when Comet's per-Spark-version
154+
// type-promotion default permits it (Spark 4.x). See ShimCometConf.
155155
return;
156156
} else if (sparkType == DataTypes.ByteType || sparkType == DataTypes.ShortType) {
157157
return;
@@ -198,8 +198,8 @@ && isUnsignedIntTypeMatched(logicalTypeAnnotation, 64)) {
198198
break;
199199
case FLOAT:
200200
if (sparkType == DataTypes.FloatType) return;
201-
// In Comet we allow schema evolution from float to double, if
202-
// `spark.comet.schemaEvolution.enabled` is enabled.
201+
// FLOAT -> DOUBLE widening is allowed when Comet's per-Spark-version
202+
// type-promotion default permits it (Spark 4.x). See ShimCometConf.
203203
if (sparkType == DataTypes.DoubleType && allowTypePromotion) return;
204204
break;
205205
case DOUBLE:

common/src/main/scala/org/apache/comet/CometConf.scala

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -727,16 +727,6 @@ object CometConf extends ShimCometConf {
727727
.booleanConf
728728
.createWithDefault(true)
729729

730-
val COMET_SCHEMA_EVOLUTION_ENABLED: ConfigEntry[Boolean] =
731-
conf("spark.comet.schemaEvolution.enabled")
732-
.internal()
733-
.category(CATEGORY_SCAN)
734-
.doc("Whether to enable schema evolution in Comet. For instance, promoting a integer " +
735-
"column to a long column, a float column to a double column, etc. This is automatically" +
736-
"enabled when reading from Iceberg tables.")
737-
.booleanConf
738-
.createWithDefault(COMET_SCHEMA_EVOLUTION_ENABLED_DEFAULT)
739-
740730
val COMET_ENABLE_PARTIAL_HASH_AGGREGATE: ConfigEntry[Boolean] =
741731
conf("spark.comet.testing.aggregate.partialMode.enabled")
742732
.internal()

common/src/main/spark-3.x/org/apache/comet/shims/ShimCometConf.scala

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,12 @@
2020
package org.apache.comet.shims
2121

2222
trait ShimCometConf {
23-
protected val COMET_SCHEMA_EVOLUTION_ENABLED_DEFAULT = false
23+
24+
/**
25+
* Whether Comet's Parquet scan paths allow widening type promotions (e.g. INT32 → INT64, FLOAT
26+
* → DOUBLE). Spark 3.x's vectorized reader rejects these on read, so Comet matches by
27+
* defaulting to false on 3.x. Reads from the deprecated `spark.comet.schemaEvolution.enabled`
28+
* SQL conf were removed in favor of this per-version constant; see #4298.
29+
*/
30+
val COMET_SCHEMA_EVOLUTION_ENABLED: Boolean = false
2431
}

common/src/main/spark-4.x/org/apache/comet/shims/ShimCometConf.scala

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,12 @@
2020
package org.apache.comet.shims
2121

2222
trait ShimCometConf {
23-
protected val COMET_SCHEMA_EVOLUTION_ENABLED_DEFAULT = true
23+
24+
/**
25+
* Whether Comet's Parquet scan paths allow widening type promotions (e.g. INT32 → INT64, FLOAT
26+
* → DOUBLE, INT32 → DOUBLE). Spark 4.x's vectorized reader accepts these by default. Reads from
27+
* the deprecated `spark.comet.schemaEvolution.enabled` SQL conf were removed in favor of this
28+
* per-version constant; see #4298.
29+
*/
30+
val COMET_SCHEMA_EVOLUTION_ENABLED: Boolean = true
2431
}

dev/diffs/3.4.3.diff

Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/pom.xml b/pom.xml
2-
index d3544881af1..d075572c5b3 100644
2+
index d3544881af1..1126f287096 100644
33
--- a/pom.xml
44
+++ b/pom.xml
55
@@ -148,6 +148,8 @@
@@ -1969,7 +1969,7 @@ index 07e2849ce6f..3e73645b638 100644
19691969
ParquetOutputFormat.WRITER_VERSION -> ParquetProperties.WriterVersion.PARQUET_2_0.toString
19701970
)
19711971
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
1972-
index 104b4e416cd..b8af360fa14 100644
1972+
index 104b4e416cd..4adb273170a 100644
19731973
--- a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFilterSuite.scala
19741974
+++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFilterSuite.scala
19751975
@@ -38,6 +38,7 @@ import org.apache.parquet.schema.MessageType
@@ -2121,28 +2121,10 @@ index 104b4e416cd..b8af360fa14 100644
21212121
case _ =>
21222122
throw new AnalysisException("Can not match ParquetTable in the query.")
21232123
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetIOSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetIOSuite.scala
2124-
index 8670d95c65e..9411af57a26 100644
2124+
index 8670d95c65e..b624c3811dd 100644
21252125
--- a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetIOSuite.scala
21262126
+++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetIOSuite.scala
2127-
@@ -41,6 +41,7 @@ import org.apache.parquet.schema.{MessageType, MessageTypeParser}
2128-
2129-
import org.apache.spark.{SPARK_VERSION_SHORT, SparkException, TestUtils}
2130-
import org.apache.spark.sql._
2131-
+import org.apache.spark.sql.IgnoreCometNativeDataFusion
2132-
import org.apache.spark.sql.catalyst.{InternalRow, ScalaReflection}
2133-
import org.apache.spark.sql.catalyst.expressions.{GenericInternalRow, UnsafeRow}
2134-
import org.apache.spark.sql.catalyst.util.DateTimeUtils
2135-
@@ -1075,7 +1076,8 @@ class ParquetIOSuite extends QueryTest with ParquetTest with SharedSparkSession
2136-
}
2137-
}
2138-
2139-
- test("SPARK-35640: int as long should throw schema incompatible error") {
2140-
+ test("SPARK-35640: int as long should throw schema incompatible error",
2141-
+ IgnoreCometNativeDataFusion("https://github.com/apache/datafusion-comet/issues/3720")) {
2142-
val data = (1 to 4).map(i => Tuple1(i))
2143-
val readSchema = StructType(Seq(StructField("_1", DataTypes.LongType)))
2144-
2145-
@@ -1335,7 +1337,8 @@ class ParquetIOSuite extends QueryTest with ParquetTest with SharedSparkSession
2127+
@@ -1335,7 +1335,8 @@ class ParquetIOSuite extends QueryTest with ParquetTest with SharedSparkSession
21462128
}
21472129
}
21482130

@@ -2153,7 +2135,7 @@ index 8670d95c65e..9411af57a26 100644
21532135
checkAnswer(
21542136
// "fruit" column in this file is encoded using DELTA_LENGTH_BYTE_ARRAY.
21552137
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetQuerySuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetQuerySuite.scala
2156-
index 29cb224c878..ee5a87fa200 100644
2138+
index 29cb224c878..dcb8a0e9bef 100644
21572139
--- a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetQuerySuite.scala
21582140
+++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetQuerySuite.scala
21592141
@@ -27,6 +27,7 @@ import org.apache.parquet.hadoop.ParquetOutputFormat
@@ -2190,7 +2172,7 @@ index 29cb224c878..ee5a87fa200 100644
21902172

21912173
- test("SPARK-34212 Parquet should read decimals correctly") {
21922174
+ test("SPARK-34212 Parquet should read decimals correctly",
2193-
+ IgnoreCometNativeDataFusion("https://github.com/apache/datafusion-comet/issues/3720")) {
2175+
+ IgnoreCometNativeDataFusion("https://github.com/apache/datafusion-comet/issues/4354")) {
21942176
def readParquet(schema: String, path: File): DataFrame = {
21952177
spark.read.schema(schema).parquet(path.toString)
21962178
}
@@ -2220,7 +2202,7 @@ index 29cb224c878..ee5a87fa200 100644
22202202

22212203
- test("row group skipping doesn't overflow when reading into larger type") {
22222204
+ test("row group skipping doesn't overflow when reading into larger type",
2223-
+ IgnoreCometNativeDataFusion("https://github.com/apache/datafusion-comet/issues/3720")) {
2205+
+ IgnoreCometNativeDataFusion("https://github.com/apache/datafusion-comet/issues/4354")) {
22242206
withTempPath { path =>
22252207
Seq(0).toDF("a").write.parquet(path.toString)
22262208
// The vectorized and non-vectorized readers will produce different exceptions, we don't need
@@ -2309,7 +2291,7 @@ index 5c0b7def039..151184bc98c 100644
23092291
assert(fileSourceScanSchemata.size === expectedSchemaCatalogStrings.size,
23102292
s"Found ${fileSourceScanSchemata.size} file sources in dataframe, " +
23112293
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetSchemaSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetSchemaSuite.scala
2312-
index bf5c51b89bb..dc3aac281c3 100644
2294+
index bf5c51b89bb..7e143a0e0f9 100644
23132295
--- a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetSchemaSuite.scala
23142296
+++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetSchemaSuite.scala
23152297
@@ -27,6 +27,7 @@ import org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName
@@ -2336,7 +2318,7 @@ index bf5c51b89bb..dc3aac281c3 100644
23362318

23372319
- test("schema mismatch failure error message for parquet vectorized reader") {
23382320
+ test("schema mismatch failure error message for parquet vectorized reader",
2339-
+ IgnoreCometNativeDataFusion("https://github.com/apache/datafusion-comet/issues/3720")) {
2321+
+ IgnoreCometNativeDataFusion("https://github.com/apache/datafusion-comet/issues/4316")) {
23402322
withTempPath { dir =>
23412323
val e = testSchemaMismatch(dir.getCanonicalPath, vectorizedReaderEnabled = true)
23422324
assert(e.getCause.isInstanceOf[SparkException])
@@ -2882,7 +2864,7 @@ index abe606ad9c1..2d930b64cca 100644
28822864
val tblTargetName = "tbl_target"
28832865
val tblSourceQualified = s"default.$tblSourceName"
28842866
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/test/SQLTestUtils.scala b/sql/core/src/test/scala/org/apache/spark/sql/test/SQLTestUtils.scala
2885-
index dd55fcfe42c..99bc018008a 100644
2867+
index dd55fcfe42c..cd18a23d4de 100644
28862868
--- a/sql/core/src/test/scala/org/apache/spark/sql/test/SQLTestUtils.scala
28872869
+++ b/sql/core/src/test/scala/org/apache/spark/sql/test/SQLTestUtils.scala
28882870
@@ -27,6 +27,7 @@ import scala.concurrent.duration._
@@ -2948,7 +2930,7 @@ index dd55fcfe42c..99bc018008a 100644
29482930
protected override def withSQLConf(pairs: (String, String)*)(f: => Unit): Unit = {
29492931
SparkSession.setActiveSession(spark)
29502932
super.withSQLConf(pairs: _*)(f)
2951-
@@ -434,6 +487,8 @@ private[sql] trait SQLTestUtilsBase
2933+
@@ -434,6 +469,8 @@ private[sql] trait SQLTestUtilsBase
29522934
val schema = df.schema
29532935
val withoutFilters = df.queryExecution.executedPlan.transform {
29542936
case FilterExec(_, child) => child
@@ -2958,7 +2940,7 @@ index dd55fcfe42c..99bc018008a 100644
29582940

29592941
spark.internalCreateDataFrame(withoutFilters.execute(), schema)
29602942
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/test/SharedSparkSession.scala b/sql/core/src/test/scala/org/apache/spark/sql/test/SharedSparkSession.scala
2961-
index ed2e309fa07..a5ea58146ad 100644
2943+
index ed2e309fa07..25b798d2c1c 100644
29622944
--- a/sql/core/src/test/scala/org/apache/spark/sql/test/SharedSparkSession.scala
29632945
+++ b/sql/core/src/test/scala/org/apache/spark/sql/test/SharedSparkSession.scala
29642946
@@ -74,6 +74,20 @@ trait SharedSparkSessionBase
@@ -3071,7 +3053,7 @@ index a902cb3a69e..800a3acbe99 100644
30713053

30723054
test("SPARK-4963 DataFrame sample on mutable row return wrong result") {
30733055
diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/hive/test/TestHive.scala b/sql/hive/src/test/scala/org/apache/spark/sql/hive/test/TestHive.scala
3074-
index 07361cfdce9..97dab2a3506 100644
3056+
index 07361cfdce9..4fdbcd18656 100644
30753057
--- a/sql/hive/src/test/scala/org/apache/spark/sql/hive/test/TestHive.scala
30763058
+++ b/sql/hive/src/test/scala/org/apache/spark/sql/hive/test/TestHive.scala
30773059
@@ -55,25 +55,41 @@ object TestHive

dev/diffs/3.5.8.diff

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/pom.xml b/pom.xml
2-
index edd2ad57880..d5273840330 100644
2+
index edd2ad57880..15a0947abf4 100644
33
--- a/pom.xml
44
+++ b/pom.xml
55
@@ -152,6 +152,8 @@
@@ -1958,7 +1958,7 @@ index 07e2849ce6f..3e73645b638 100644
19581958
ParquetOutputFormat.WRITER_VERSION -> ParquetProperties.WriterVersion.PARQUET_2_0.toString
19591959
)
19601960
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
1961-
index 8e88049f51e..20d7ef7b1bc 100644
1961+
index 8e88049f51e..097c518a19a 100644
19621962
--- a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFilterSuite.scala
19631963
+++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFilterSuite.scala
19641964
@@ -1095,7 +1095,11 @@ abstract class ParquetFilterSuite extends QueryTest with ParquetTest with Shared
@@ -2104,20 +2104,10 @@ index 8e88049f51e..20d7ef7b1bc 100644
21042104
case _ =>
21052105
throw new AnalysisException("Can not match ParquetTable in the query.")
21062106
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetIOSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetIOSuite.scala
2107-
index 8ed9ef1630e..71e22972a47 100644
2107+
index 8ed9ef1630e..eed2a6f5ad5 100644
21082108
--- a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetIOSuite.scala
21092109
+++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetIOSuite.scala
2110-
@@ -1075,7 +1075,8 @@ class ParquetIOSuite extends QueryTest with ParquetTest with SharedSparkSession
2111-
}
2112-
}
2113-
2114-
- test("SPARK-35640: int as long should throw schema incompatible error") {
2115-
+ test("SPARK-35640: int as long should throw schema incompatible error",
2116-
+ IgnoreCometNativeDataFusion("https://github.com/apache/datafusion-comet/issues/3720")) {
2117-
val data = (1 to 4).map(i => Tuple1(i))
2118-
val readSchema = StructType(Seq(StructField("_1", DataTypes.LongType)))
2119-
2120-
@@ -1345,7 +1346,8 @@ class ParquetIOSuite extends QueryTest with ParquetTest with SharedSparkSession
2110+
@@ -1345,7 +1345,8 @@ class ParquetIOSuite extends QueryTest with ParquetTest with SharedSparkSession
21212111
}
21222112
}
21232113

@@ -2128,7 +2118,7 @@ index 8ed9ef1630e..71e22972a47 100644
21282118
checkAnswer(
21292119
// "fruit" column in this file is encoded using DELTA_LENGTH_BYTE_ARRAY.
21302120
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetQuerySuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetQuerySuite.scala
2131-
index f6472ba3d9d..5ea2d938664 100644
2121+
index f6472ba3d9d..b62ff2975e6 100644
21322122
--- a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetQuerySuite.scala
21332123
+++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetQuerySuite.scala
21342124
@@ -185,7 +185,8 @@ abstract class ParquetQuerySuite extends QueryTest with ParquetTest with SharedS
@@ -2157,7 +2147,7 @@ index f6472ba3d9d..5ea2d938664 100644
21572147

21582148
- test("SPARK-34212 Parquet should read decimals correctly") {
21592149
+ test("SPARK-34212 Parquet should read decimals correctly",
2160-
+ IgnoreCometNativeDataFusion("https://github.com/apache/datafusion-comet/issues/3720")) {
2150+
+ IgnoreCometNativeDataFusion("https://github.com/apache/datafusion-comet/issues/4354")) {
21612151
def readParquet(schema: String, path: File): DataFrame = {
21622152
spark.read.schema(schema).parquet(path.toString)
21632153
}
@@ -2187,7 +2177,7 @@ index f6472ba3d9d..5ea2d938664 100644
21872177

21882178
- test("row group skipping doesn't overflow when reading into larger type") {
21892179
+ test("row group skipping doesn't overflow when reading into larger type",
2190-
+ IgnoreCometNativeDataFusion("https://github.com/apache/datafusion-comet/issues/3720")) {
2180+
+ IgnoreCometNativeDataFusion("https://github.com/apache/datafusion-comet/issues/4354")) {
21912181
withTempPath { path =>
21922182
Seq(0).toDF("a").write.parquet(path.toString)
21932183
// The vectorized and non-vectorized readers will produce different exceptions, we don't need
@@ -2276,7 +2266,7 @@ index 5c0b7def039..151184bc98c 100644
22762266
assert(fileSourceScanSchemata.size === expectedSchemaCatalogStrings.size,
22772267
s"Found ${fileSourceScanSchemata.size} file sources in dataframe, " +
22782268
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetSchemaSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetSchemaSuite.scala
2279-
index 3f47c5e506f..2ac0868407e 100644
2269+
index 3f47c5e506f..80b7ef6c46a 100644
22802270
--- a/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetSchemaSuite.scala
22812271
+++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetSchemaSuite.scala
22822272
@@ -27,6 +27,7 @@ import org.apache.parquet.schema.PrimitiveType.PrimitiveTypeName
@@ -2303,7 +2293,7 @@ index 3f47c5e506f..2ac0868407e 100644
23032293

23042294
- test("schema mismatch failure error message for parquet vectorized reader") {
23052295
+ test("schema mismatch failure error message for parquet vectorized reader",
2306-
+ IgnoreCometNativeDataFusion("https://github.com/apache/datafusion-comet/issues/3720")) {
2296+
+ IgnoreCometNativeDataFusion("https://github.com/apache/datafusion-comet/issues/4316")) {
23072297
withTempPath { dir =>
23082298
val e = testSchemaMismatch(dir.getCanonicalPath, vectorizedReaderEnabled = true)
23092299
assert(e.getCause.isInstanceOf[SparkException])
@@ -2834,7 +2824,7 @@ index abe606ad9c1..2d930b64cca 100644
28342824
val tblTargetName = "tbl_target"
28352825
val tblSourceQualified = s"default.$tblSourceName"
28362826
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/test/SQLTestUtils.scala b/sql/core/src/test/scala/org/apache/spark/sql/test/SQLTestUtils.scala
2837-
index e937173a590..7d20538bc68 100644
2827+
index e937173a590..3134078a122 100644
28382828
--- a/sql/core/src/test/scala/org/apache/spark/sql/test/SQLTestUtils.scala
28392829
+++ b/sql/core/src/test/scala/org/apache/spark/sql/test/SQLTestUtils.scala
28402830
@@ -27,6 +27,7 @@ import scala.concurrent.duration._
@@ -2900,7 +2890,7 @@ index e937173a590..7d20538bc68 100644
29002890
protected override def withSQLConf(pairs: (String, String)*)(f: => Unit): Unit = {
29012891
SparkSession.setActiveSession(spark)
29022892
super.withSQLConf(pairs: _*)(f)
2903-
@@ -435,6 +488,8 @@ private[sql] trait SQLTestUtilsBase
2893+
@@ -435,6 +470,8 @@ private[sql] trait SQLTestUtilsBase
29042894
val schema = df.schema
29052895
val withoutFilters = df.queryExecution.executedPlan.transform {
29062896
case FilterExec(_, child) => child
@@ -2910,7 +2900,7 @@ index e937173a590..7d20538bc68 100644
29102900

29112901
spark.internalCreateDataFrame(withoutFilters.execute(), schema)
29122902
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/test/SharedSparkSession.scala b/sql/core/src/test/scala/org/apache/spark/sql/test/SharedSparkSession.scala
2913-
index ed2e309fa07..a5ea58146ad 100644
2903+
index ed2e309fa07..25b798d2c1c 100644
29142904
--- a/sql/core/src/test/scala/org/apache/spark/sql/test/SharedSparkSession.scala
29152905
+++ b/sql/core/src/test/scala/org/apache/spark/sql/test/SharedSparkSession.scala
29162906
@@ -74,6 +74,20 @@ trait SharedSparkSessionBase
@@ -3023,7 +3013,7 @@ index 6160c3e5f6c..0956d7d9edc 100644
30233013

30243014
test("SPARK-4963 DataFrame sample on mutable row return wrong result") {
30253015
diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/hive/test/TestHive.scala b/sql/hive/src/test/scala/org/apache/spark/sql/hive/test/TestHive.scala
3026-
index 1d646f40b3e..5babe505301 100644
3016+
index 1d646f40b3e..df108c17c42 100644
30273017
--- a/sql/hive/src/test/scala/org/apache/spark/sql/hive/test/TestHive.scala
30283018
+++ b/sql/hive/src/test/scala/org/apache/spark/sql/hive/test/TestHive.scala
30293019
@@ -53,25 +53,41 @@ object TestHive

0 commit comments

Comments
 (0)