Details
-
New Feature
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.5.0
-
None
Description
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")