Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update CTEInlineSuite.scala
  • Loading branch information
cloud-fan authored Jun 28, 2024
commit 88544e9e6cb825f2b8b5bc950ac6ace4456844f7
18 changes: 8 additions & 10 deletions sql/core/src/test/scala/org/apache/spark/sql/CTEInlineSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -705,16 +705,14 @@ abstract class CTEInlineSuiteBase
}

test("SPARK-48307: not-inlined CTE references sibling") {
withTempView("t") {
val df = sql(
"""
|WITH
|v1 AS (SELECT 1 col),
|v2 AS (SELECT col, rand() FROM v1)
|SELECT l.col FROM v2 l JOIN v2 r ON l.col = r.col
|""".stripMargin)
checkAnswer(df, Row(1))
}
val df = sql(
"""
|WITH
|v1 AS (SELECT 1 col),
|v2 AS (SELECT col, rand() FROM v1)
|SELECT l.col FROM v2 l JOIN v2 r ON l.col = r.col
|""".stripMargin)
checkAnswer(df, Row(1))
}
}

Expand Down