Mihailo Milosevic created SPARK-49017:
-----------------------------------------

             Summary: Insert statement fails when multiple parameters are being 
used
                 Key: SPARK-49017
                 URL: https://issues.apache.org/jira/browse/SPARK-49017
             Project: Spark
          Issue Type: Bug
          Components: SQL
    Affects Versions: 4.0.0
            Reporter: Mihailo Milosevic


{code:java}
// Create table
spark.sql("create table testtab (id int, name string)").show()

// Insert into table using single param - WORKS
spark.sql("insert into identifier(:tab) values(1, 'test1')",
  Map("tab" -> "testtab")).show()

// Select from table using param - WORKS
spark.sql("select * from identifier(:tab)",
  Map("tab" -> "testtab")).show()

// Insert into table using multiple params - FAILS
spark.sql("insert into identifier(:tab) values(2, :name)",
  Map("tab" -> "testtab", "name" -> "test2")).show() {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to