[ 
https://issues.apache.org/jira/browse/HIVE-19064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17090634#comment-17090634
 ] 

David Mollitor commented on HIVE-19064:
---------------------------------------

[~kkasa] Thanks for the collaboration.

I am very worried about adding a new mode in terms of supportability and 
maintainability. I would rather Hive mimic the SQL standard as implemented by 
MySQL and that be the only "option."

As currently implemented, the "none/columns" is very confusing.  I mentioned 
this in a few JIRAs and a mailing list thread and it is what prompted my 
wanting to remove the Regex feature.  If a user has "none" specified as an 
option, then the grammar still allows back ticks to support the regex feature.

{code:sql|title=Regex Columns are Very Confusing}
set hive.support.quoted.identifiers=none;

-- This works
select column from db.table;

-- Yet this works anyway even though quoted identifiers are 'none'
select `column` from db.table;

-- This throws an error because forward-slash is not considered a regex
select `colu/mn` from db.table;
{code}

  
{code:sql|title=Example}
SELECT column FROM db.table;
SELECT `column` FROM `db`.`table`;
SELECT column FROM `db`.`table`;
SELECT `column` FROM `db`.`table`;

-- This is what I am requesting
set hive.support.quoted.identifiers=true;
SELECT `column` FROM `db`."table";
SELECT "column" FROM `db`.table;
SELECT column FROM db.table;

-- This would replace the regex feature. It expands the SQL standard instead of 
overloading
-- HIVE-16496
select * exclude (cre_ts,upd_ts) from table;
{code}

So what is being proposed here adds three different modes which all mean three 
different things, with three different code paths, which still does not get 
Hive in line with MySQL for a drop-in replacement.  I have a lot of 
reservations about this.

> Add mode to support delimited identifiers enclosed within double quotation
> --------------------------------------------------------------------------
>
>                 Key: HIVE-19064
>                 URL: https://issues.apache.org/jira/browse/HIVE-19064
>             Project: Hive
>          Issue Type: Improvement
>          Components: Parser, SQL
>    Affects Versions: 3.0.0
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Krisztian Kasa
>            Priority: Major
>         Attachments: HIVE-19064.01.patch, HIVE-19064.02.patch, 
> HIVE-19064.03.patch, HIVE-19064.4.patch, HIVE-19064.5.patch, 
> HIVE-19064.6.patch, HIVE-19064.7.patch
>
>
> As per SQL standard. Hive currently uses `` (backticks). Default will 
> continue being backticks, but we will support identifiers within double 
> quotation via configuration parameter.
> This issue will also extends support for arbitrary char sequences, e.g., 
> containing {{~ ! @ # $ % ^ & * () , < >}}, in database and table names. 
> Currently, special characters are only supported for column names.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to