Skip to content

Commit 3ae3e34

Browse files
committed
[SPARK-52950][SQL][TESTS] Enable ANSI mode in DataSourceV2StrategySuite
### What changes were proposed in this pull request? This PR proposes to explicitly enable ANSI mode in `DataSourceV2StrategySuite`. ### Why are the changes needed? To fix the test failure when ANSI is off https://github.com/apache/spark/actions/runs/16485653304/job/46609769023 ### Does this PR introduce _any_ user-facing change? No, test-only. ### How was this patch tested? Manually tested. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #51660 from HyukjinKwon/SPARK-52950. Authored-by: Hyukjin Kwon <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
1 parent d148e9b commit 3ae3e34

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2StrategySuite.scala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,24 @@
1717

1818
package org.apache.spark.sql.execution.datasources.v2
1919

20+
import org.apache.spark.SparkConf
2021
import org.apache.spark.sql.catalyst.analysis.UnresolvedAttribute
2122
import org.apache.spark.sql.catalyst.dsl.expressions._
2223
import org.apache.spark.sql.catalyst.expressions._
2324
import org.apache.spark.sql.catalyst.plans.PlanTest
2425
import org.apache.spark.sql.catalyst.util.V2ExpressionBuilder
2526
import org.apache.spark.sql.connector.expressions.{Expression => V2Expression, FieldReference, GeneralScalarExpression, LiteralValue}
2627
import org.apache.spark.sql.connector.expressions.filter.{AlwaysFalse, AlwaysTrue, And => V2And, Not => V2Not, Or => V2Or, Predicate}
28+
import org.apache.spark.sql.internal.SQLConf
2729
import org.apache.spark.sql.test.SharedSparkSession
2830
import org.apache.spark.sql.types.{BooleanType, DoubleType, IntegerType, LongType, StringType, StructField, StructType}
2931
import org.apache.spark.unsafe.types.UTF8String
3032

3133
class DataSourceV2StrategySuite extends PlanTest with SharedSparkSession {
34+
35+
override protected def sparkConf: SparkConf = super.sparkConf
36+
.set(SQLConf.ANSI_ENABLED, true)
37+
3238
val attrInts = Seq(
3339
$"cint".int,
3440
$"`c.int`".int,

0 commit comments

Comments
 (0)