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

Max Gekk updated SPARK-50403:
-----------------------------
    Description: 
When spark.sql() is invoked with parameters (named or positionals), and tries 
to execute a query via EXECUTE IMMEDIATE using parameters too, the call fails 
w/ on an assert:

{code:scala}
spark.sql("execute immediate ‘select ?' using 1", Map("param1" -> "1"))
{code}

The output:

{code:java}
[INTERNAL_ERROR] The Spark SQL phase analysis failed with an internal error. 
You hit a bug in Spark or the Spark plugins you use. Please, report this bug to 
the corresponding communities or vendors, and provide the full stack trace. 
SQLSTATE: XX000
org.apache.spark.SparkException: [INTERNAL_ERROR] The Spark SQL phase analysis 
failed with an internal error. You hit a bug in Spark or the Spark plugins you 
use. Please, report this bug to the corresponding communities or vendors, and 
provide the full stack trace. SQLSTATE: XX000
        at 
org.apache.spark.SparkException$.internalError(SparkException.scala:107)
        at 
org.apache.spark.sql.execution.QueryExecution$.toInternalError(QueryExecution.scala:623)
        at 
org.apache.spark.sql.execution.QueryExecution$.withInternalError(QueryExecution.scala:636)
        at 
org.apache.spark.sql.execution.QueryExecution.$anonfun$executePhase$1(QueryExecution.scala:258)
{code}


  was:
When spark.sql() is invoked with parameters (named or positionals), and tries 
to execute a query via EXECUTE IMMEDIATE using parameters too, the call fails 
w/ on an assert:

{code:scala}
spark.sql("execute immediate ‘select ?' using 1", Map("param1" -> "1"))
{code}



> Internal error from EXECUTE IMMEDIATE and spark.sql w/ parameters
> -----------------------------------------------------------------
>
>                 Key: SPARK-50403
>                 URL: https://issues.apache.org/jira/browse/SPARK-50403
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 4.0.0
>            Reporter: Max Gekk
>            Assignee: Max Gekk
>            Priority: Major
>
> When spark.sql() is invoked with parameters (named or positionals), and tries 
> to execute a query via EXECUTE IMMEDIATE using parameters too, the call fails 
> w/ on an assert:
> {code:scala}
> spark.sql("execute immediate ‘select ?' using 1", Map("param1" -> "1"))
> {code}
> The output:
> {code:java}
> [INTERNAL_ERROR] The Spark SQL phase analysis failed with an internal error. 
> You hit a bug in Spark or the Spark plugins you use. Please, report this bug 
> to the corresponding communities or vendors, and provide the full stack 
> trace. SQLSTATE: XX000
> org.apache.spark.SparkException: [INTERNAL_ERROR] The Spark SQL phase 
> analysis failed with an internal error. You hit a bug in Spark or the Spark 
> plugins you use. Please, report this bug to the corresponding communities or 
> vendors, and provide the full stack trace. SQLSTATE: XX000
>       at 
> org.apache.spark.SparkException$.internalError(SparkException.scala:107)
>       at 
> org.apache.spark.sql.execution.QueryExecution$.toInternalError(QueryExecution.scala:623)
>       at 
> org.apache.spark.sql.execution.QueryExecution$.withInternalError(QueryExecution.scala:636)
>       at 
> org.apache.spark.sql.execution.QueryExecution.$anonfun$executePhase$1(QueryExecution.scala:258)
> {code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to