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
Uppercase SQL in the test
  • Loading branch information
MaxGekk committed Nov 15, 2024
commit 567e724553a3b10447d09e88a19b258f14001cb9
Original file line number Diff line number Diff line change
Expand Up @@ -744,14 +744,14 @@ class ParametersSuite extends QueryTest with SharedSparkSession with PlanTest {

test("SPARK-50322: parameterized identifier in a sub-query") {
withTable("tt1") {
sql("create table tt1(c1 int)")
sql("insert into tt1 values (1)")
sql("CREATE TABLE tt1 (c1 INT)")
sql("INSERT INTO tt1 VALUES (1)")
def query(p: String): String = {
s"""
|with v1 as (
| select * from tt1
| where 1 = (Select * from identifier($p))
|) select * from v1""".stripMargin
|WITH v1 AS (
| SELECT * FROM tt1
| WHERE 1 = (SELECT * FROM IDENTIFIER($p))
|) SELECT * FROM v1""".stripMargin
}

checkAnswer(spark.sql(query(":tab"), args = Map("tab" -> "tt1")), Row(1))
Expand Down