[
https://issues.apache.org/jira/browse/HIVE-19064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17090442#comment-17090442
]
Krisztian Kasa commented on HIVE-19064:
---------------------------------------
Hive has a setting *hive.support.quoted.identifiers* where mode can be
specified.
Currently this setting can have two values so Hive supports two modes:
* none - past behavior, it implies only alphaNumeric and underscore are valid
characters in identifiers.
Plus regular expressions in backticks are supported for column
names.
See regex_col.q for examples
* columns - implies identifier names can contain any character by using
backticks
So the specified mode is determining if a column is an identifier with special
characters or if it's a regex value.
My last patch ([^HIVE-19064.7.patch]) is adding a 3rd mode: standard
In standard mode identifiers within double quotation is supported. Backitcks
has no special meaning and regular expressions for column names are not
supported. String literals must be specified within single quotation.
Combining these modes are not possible because in *column* mode Hive supports
both single and double quotation for string literals. Even if regular
expression support would be removed there would be ambiguity issues because of
the meaning of double quotation.
IMHO all the features mentioned above can be supported with the three modes and
we also keep backward compatibility.
> 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)