Skip to content

Commit 646b84b

Browse files
vladimirg-dbcloud-fan
authored andcommitted
[SPARK-51522][SQL] Disable lazy union children test for single-pass Analyzer
### What changes were proposed in this pull request? Disable lazy union children test for single-pass Analyzer. ### Why are the changes needed? Single-pass Analyzer won't support this oddity - this is not possible to do using a regular Dataset API. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? `build/sbt "testOnly org.apache.spark.sql.execution.PlannerSuite"` ### Was this patch authored or co-authored using generative AI tooling? No. Closes #50289 from vladimirg-db/vladimir-golubev_data/disable-lazy-union-children-in-single-pass-analyzer. Authored-by: Vladimir Golubev <vladimir.golubev@databricks.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com>
1 parent 4ef0dc0 commit 646b84b

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

sql/core/src/test/scala/org/apache/spark/sql/execution/PlannerSuite.scala

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -744,18 +744,28 @@ class PlannerSuite extends SharedSparkSession with AdaptiveSparkPlanHelper {
744744
}
745745

746746
test("SPARK-24500: create union with stream of children") {
747-
@scala.annotation.nowarn("cat=deprecation")
748-
val df = Union(Stream(
749-
Range(1, 1, 1, 1),
750-
Range(1, 2, 1, 1)))
751-
df.queryExecution.executedPlan.execute()
747+
withSQLConf(
748+
SQLConf.ANALYZER_SINGLE_PASS_RESOLVER_ENABLED.key -> "false",
749+
SQLConf.ANALYZER_DUAL_RUN_LEGACY_AND_SINGLE_PASS_RESOLVER.key -> "false"
750+
) {
751+
@scala.annotation.nowarn("cat=deprecation")
752+
val df = Union(Stream(
753+
Range(1, 1, 1, 1),
754+
Range(1, 2, 1, 1)))
755+
df.queryExecution.executedPlan.execute()
756+
}
752757
}
753758

754759
test("SPARK-45685: create union with LazyList of children") {
755-
val df = Union(LazyList(
756-
Range(1, 1, 1, 1),
757-
Range(1, 2, 1, 1)))
758-
df.queryExecution.executedPlan.execute()
760+
withSQLConf(
761+
SQLConf.ANALYZER_SINGLE_PASS_RESOLVER_ENABLED.key -> "false",
762+
SQLConf.ANALYZER_DUAL_RUN_LEGACY_AND_SINGLE_PASS_RESOLVER.key -> "false"
763+
) {
764+
val df = Union(LazyList(
765+
Range(1, 1, 1, 1),
766+
Range(1, 2, 1, 1)))
767+
df.queryExecution.executedPlan.execute()
768+
}
759769
}
760770

761771
test("SPARK-25278: physical nodes should be different instances for same logical nodes") {

0 commit comments

Comments
 (0)