Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-49017

Insert statement fails when multiple parameters are being used

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 4.0.0, 3.5.3
    • 4.0.0
    • SQL

    Description

      // 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() 

      Attachments

        Activity

          People

            mihailo.milosevic Mihailo Milosevic
            mihailo.milosevic Mihailo Milosevic
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: