spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "feiwang (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SPARK-26999) SparkSQL CLIDriver parses sql statement incorrectly
Date Wed, 27 Feb 2019 02:41:00 GMT

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

feiwang updated SPARK-26999:
----------------------------
    Description: 
SparkSQLCLIDriver parse sql statement incorrectly, because its processLine method is not correct.
The processLine method is one method of CLIDriver, which is a class of hive-cli.
SparkSQLCLIDriver extends CLIDriver, but it does't override processLine method.
The spark-hive-cliet version of master branch is hive-1.2.1.spark2.
In hive-1.2.1, the processLine method splits statement directly by ";", however, there may
be a quote.
For example:
The statement:
{code:java}
select * from table_a where column_a not like '%;';{code}

Will be parsed to:
{code:java}
select * from table_a where column_a not like '%{code}
 

 

  was:
SparkSQLCLIDriver parse sql statement incorrectly, because its processLine method is not correct.
 The processLine method is one method of CLIDriver, which is a class of hive-cli.
 SparkSQLCLIDriver extends CLIDriver, but it does't override processLine method.
 The spark-hive-cliet version of master branch is hive-1.2.1.spark2.
 In hive-1.2.1, the processLine method splits statement directly by ";", however, there may
be a quote.
 For example:
 The statement:
 * 
{code:java}
select * from table_a where column_a not like '%;';符
{code}
Will be parsed to:

 
{code:java}
select * from table_a where column_a not like '%{code}
 

 


> SparkSQL CLIDriver  parses sql statement incorrectly
> ----------------------------------------------------
>
>                 Key: SPARK-26999
>                 URL: https://issues.apache.org/jira/browse/SPARK-26999
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.3.2, 2.3.3, 2.4.0
>            Reporter: feiwang
>            Priority: Major
>
> SparkSQLCLIDriver parse sql statement incorrectly, because its processLine method is
not correct.
> The processLine method is one method of CLIDriver, which is a class of hive-cli.
> SparkSQLCLIDriver extends CLIDriver, but it does't override processLine method.
> The spark-hive-cliet version of master branch is hive-1.2.1.spark2.
> In hive-1.2.1, the processLine method splits statement directly by ";", however, there
may be a quote.
> For example:
> The statement:
> {code:java}
> select * from table_a where column_a not like '%;';{code}
> Will be parsed to:
> {code:java}
> select * from table_a where column_a not like '%{code}
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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


Mime
View raw message