[
https://issues.apache.org/jira/browse/SPARK-54876?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Fu Sheng updated SPARK-54876:
-----------------------------
Description:
For the sql statement:
{quote}val query = "SELECT 1; insert into table A select * from B /* comment
*/";
{quote}
When I use:
{quote}val cli = new SparkSQLCLIDriver
val res = cli.splitSemiColon(query){quote}
The query would be split to one statement: "SELECT 1"
But the correct approach is to split it into two statements:
The first: "SELECT 1"
The second: "SELECT /* comment */"
was:
For the sql statement:
{quote}val sql = "SELECT 1; SELECT /* comment */";
{quote}
Would be split to one statement: "SELECT 1"
But the correct approach is to split it into two statements:
The first: "SELECT 1"
The second: "SELECT /* comment */"
> Spark SQL CLI:Incorrectly split the SQL statements.
> ---------------------------------------------------
>
> Key: SPARK-54876
> URL: https://issues.apache.org/jira/browse/SPARK-54876
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 4.0.1
> Reporter: Fu Sheng
> Priority: Minor
>
> For the sql statement:
> {quote}val query = "SELECT 1; insert into table A select * from B /* comment
> */";
> {quote}
> When I use:
> {quote}val cli = new SparkSQLCLIDriver
> val res = cli.splitSemiColon(query){quote}
> The query would be split to one statement: "SELECT 1"
> But the correct approach is to split it into two statements:
> The first: "SELECT 1"
> The second: "SELECT /* comment */"
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]