[ 
https://issues.apache.org/jira/browse/SPARK-44680?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Max Gekk reassigned SPARK-44680:
--------------------------------

    Assignee: Max Gekk

> parameter markers are not blocked from DEFAULT (and other places)
> -----------------------------------------------------------------
>
>                 Key: SPARK-44680
>                 URL: https://issues.apache.org/jira/browse/SPARK-44680
>             Project: Spark
>          Issue Type: Bug
>          Components: Spark Core
>    Affects Versions: 3.4.0
>            Reporter: Serge Rielau
>            Assignee: Max Gekk
>            Priority: Major
>
> scala> spark.sql("CREATE TABLE t11(c1 int default :parm)", args = Map("parm" 
> -> 5)).show()
> -> success
> scala> spark.sql("describe t11");
> [INVALID_DEFAULT_VALUE.UNRESOLVED_EXPRESSION] Failed to execute 
> EXISTS_DEFAULT command because the destination table column `c1` has a 
> DEFAULT value :parm, which fails to resolve as a valid expression.
> This likely extends to other DDL-y places.
> I can only find protection against placement in the body of a CREATE VIEW.
> I see two ways out of this:
> * Raise an error (as we do for CREATE VIEW v1(c1) AS SELECT ? )
>  * Improve the way we persist queries/expressions to substitute the 
> at-DDL-time bound parameter value (it' not a bug it's a feature....)



--
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