[
https://issues.apache.org/jira/browse/SPARK-28696?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16905175#comment-16905175
]
Hyukjin Kwon edited comment on SPARK-28696 at 8/13/19 6:05 AM:
---------------------------------------------------------------
In Hive creating database {{_a}} not allowed but {{a_}} allowed.
{code}
jdbc:hive2://10.18.98.147:21066/> create database _a;
Error: Error while compiling statement: FAILED: ParseException line 1:16 cannot
recognize input near '_a--0' '<EOF>' '<EOF>' in create database statement
(state=42000,code=40000)
jdbc:hive2://10.18.98.147:21066/> create database a_; -- Success
{code}
In Spark allowed both {{_a}} and {{a_}}
{code}
spark-sql> create database _a;
Time taken: 0.07 seconds
spark-sql> create database a_;
Time taken: 0.062 seconds
spark-sql> show databases;
_a
a_
{code}
was (Author: abhishek.akg):
In hive creating database _a not allowed but a_ allowed.
jdbc:hive2://10.18.98.147:21066/> create database _a;
Error: Error while compiling statement: FAILED: ParseException line 1:16 cannot
recognize input near '_a--0' '<EOF>' '<EOF>' in create database statement
(state=42000,code=40000)
jdbc:hive2://10.18.98.147:21066/> create database a_; -- Success
In Spark allowed both _a and a_
spark-sql> create database _a;
Time taken: 0.07 seconds
spark-sql> create database a_;
Time taken: 0.062 seconds
spark-sql> show databases;
_a
a_
> create database _; allowing in Spark but Hive throws Parse Exception
> --------------------------------------------------------------------
>
> Key: SPARK-28696
> URL: https://issues.apache.org/jira/browse/SPARK-28696
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 3.0.0
> Reporter: ABHISHEK KUMAR GUPTA
> Priority: Minor
>
> In Spark
> {code}
> spark-sql> create database _;
> Time taken: 0.062 seconds
> spark-sql> show databases;
> _
> adap
> adaptive
> adaptive_tc8
> {code}
> In Hive
> {code}
> 0: jdbc:hive2://10.18.98.147:21066/> create database _;
> Error: Error while compiling statement: FAILED: ParseException line 1:16
> cannot recognize input near '_--0' '<EOF>' '<EOF>' in create database
> statement (state=42000,code=40000)
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]