You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2024/02/29 09:07:00 UTC

[jira] [Assigned] (SPARK-47033) EXECUTE IMMEDIATE USING does not recognize session variable names

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

ASF GitHub Bot reassigned SPARK-47033:
--------------------------------------

    Assignee: Apache Spark

> EXECUTE IMMEDIATE USING does not recognize session variable names
> -----------------------------------------------------------------
>
>                 Key: SPARK-47033
>                 URL: https://issues.apache.org/jira/browse/SPARK-47033
>             Project: Spark
>          Issue Type: Bug
>          Components: Spark Core
>    Affects Versions: 4.0.0
>            Reporter: Serge Rielau
>            Assignee: Apache Spark
>            Priority: Major
>              Labels: pull-request-available
>
> {noformat}
> DECLARE parm = 'Hello';
> EXECUTE IMMEDIATE 'SELECT :parm' USING parm;
> [ALL_PARAMETERS_MUST_BE_NAMED] Using name parameterized queries requires all parameters to be named. Parameters missing names: "parm". SQLSTATE: 07001
> EXECUTE IMMEDIATE 'SELECT :parm' USING parm AS parm;
> Hello
> {noformat}
> variables are like column references, they act as their own aliases and thus should not be required to be named to associate with a named parameter with the same name.
> Note that unlike for pySpark this should be case insensitive (haven't verified).



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

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