Serge Rielau created SPARK-47033:
------------------------------------

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


{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-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to