You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "David Mollitor (Jira)" <ji...@apache.org> on 2020/04/02 04:12:00 UTC

[jira] [Updated] (HIVE-23128) SHOW CREATE TABLE Creates Incorrect Syntax When Database Specified

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

David Mollitor updated HIVE-23128:
----------------------------------
    Summary: SHOW CREATE TABLE Creates Incorrect Syntax When Database Specified  (was: SHOW CREATE TABLE Creates Invalid Syntax When Database Specified)

> SHOW CREATE TABLE Creates Incorrect Syntax When Database Specified
> ------------------------------------------------------------------
>
>                 Key: HIVE-23128
>                 URL: https://issues.apache.org/jira/browse/HIVE-23128
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 2.4.0, 3.1.2
>            Reporter: David Mollitor
>            Priority: Major
>
> {code:sql}
> show create table `sample_07`;
> show create table `default`.`sample_07`;
> show create table `default.sample_07`;
> {code}
> {code:none|title=Results}
> CREATE TABLE `sample_07`(...)
> CREATE TABLE `default.sample_07`(...)
> CREATE TABLE `default.sample_07`(...);
> {code}
> All three queries complete in Hive 2.x (not sure about 3.x) but the results are consistent in both versions.  The first result is correct because it does not include the database name, however, the subsequent two results are invalid: each field must be quoted individually.
> {quote}
> If any components of a multiple-part name require quoting, quote them individually rather than quoting the name as a whole. For example, write `my-table`.`my-column`, not `my-table.my-column`.
> * https://dev.mysql.com/doc/refman/8.0/en/identifier-qualifiers.html
> {quote}



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