[
https://issues.apache.org/jira/browse/CARBONDATA-587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15825985#comment-15825985 ]
Naresh P R commented on CARBONDATA-587:
---------------------------------------
Hi Anubhav,
We have allowed reserve keywords to be used as part of table name & column name intentionally inorder to be in sync with Hive Create Table support.
This is the Jira
https://issues.apache.org/jira/browse/CARBONDATA-67Hive table create also passes with the reserved keywords.
jdbc:hive2://localhost:10000> CREATE TABLE null(int int) stored as parquet;
+---------+--+
| Result |
+---------+--+
+---------+--+
No rows selected (0.482 seconds)
In 1.6, we are using HiveQL parser for create table command, it will validate reserve words and return the AST Tree. When some keywords are reserved in Hive, automatically exception will be thrown.
IMHO, we don't need to fix this issue. Please let me know if any special case to be handled
> for any SQL syntax reserved keywords should be avoided.
> -------------------------------------------------------
>
> Key: CARBONDATA-587
> URL:
https://issues.apache.org/jira/browse/CARBONDATA-587> Project: CarbonData
> Issue Type: Bug
> Components: spark-integration
> Affects Versions: 1.0.0-incubating
> Environment: spark 1.6
> Reporter: anubhav tarar
> Assignee: Naresh P R
> Priority: Minor
>
> I Am Able to use reserved keyword in Carbon Table Commands
> CREATE TABLE Bug221755915(int int)USING org.apache.spark.sql.CarbonSource;
> +---------+--+
> | Result |
> +---------+--+
> +---------+--+
> jdbc:hive2://localhost:10000> CREATE TABLE null(int int)USING org.apache.spark.sql.CarbonSource;
> +---------+--+
> | Result |
> +---------+--+
> +---------+--+
> No rows selected (0.267 seconds)
> there is no check on identifiers in carbon data
> another example
> create database join;
> Error: org.apache.spark.sql.AnalysisException: cannot recognize input near 'join' '<EOF>' '<EOF>' in create database statement; line 1 pos 16 (state=,code=0)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)