Serge Rielau created SPARK-43884:
------------------------------------

             Summary: Allow parameter markers in DDL (again)
                 Key: SPARK-43884
                 URL: https://issues.apache.org/jira/browse/SPARK-43884
             Project: Spark
          Issue Type: New Feature
          Components: Spark Core
    Affects Versions: 3.5.0
            Reporter: Serge Rielau


When we introduced parameter markers initially, we allowed them n any SQL 
statement.
Subsequently, we have limited their use to DML and queries because that aligns 
better with the industry and we saw no immediate use for broader support.

However, we have introduced the IDENTIFIER() clause, which allows templating 
table-, and function-identifiers in DDL statements. 
To exploit this, we need parameter markers as argument:

spark.sql("CREATE TABLE IDENTIFIER(:tableName) (c1 INT)", args = 
Map("tableName" -> "mytable") 



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to