You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/07/18 22:11:00 UTC

[jira] [Commented] (TRAFODION-3153) CREATE EXTERNAL TABLE doesn't report error if Hive table already exists

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

ASF GitHub Bot commented on TRAFODION-3153:
-------------------------------------------

GitHub user DaveBirdsall opened a pull request:

    https://github.com/apache/trafodion/pull/1652

    [TRAFODION-3153] Fix issue with CREATE EXTERNAL TABLE

    Change the parser production for CREATE EXTERNAL TABLE to point to the proper token for the optional IF NOT EXISTS clause.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/DaveBirdsall/trafodion Trafodion3153

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/trafodion/pull/1652.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1652
    
----
commit 133fc53973cbd82f12713217f1e00c6a71190dde
Author: Dave Birdsall <db...@...>
Date:   2018-07-18T22:05:38Z

    [TRAFODION-3153] Fix issue with CREATE EXTERNAL TABLE

----


> CREATE EXTERNAL TABLE doesn't report error if Hive table already exists
> -----------------------------------------------------------------------
>
>                 Key: TRAFODION-3153
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-3153
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: sql-cmp
>    Affects Versions: 2.3
>            Reporter: David Wayne Birdsall
>            Assignee: David Wayne Birdsall
>            Priority: Major
>
> The following session demonstrates the problem. The second CREATE EXTERNAL TABLE statement should fail and report that the object already exists, but instead it reports success.
> {quote}
> >>drop external table if exists hive.hive.test1;
> --- SQL operation complete.
> >>
> >>create external table hive.hive.test1
> +>( a date, b char(20) )
> +>row format delimited fields terminated by '|' 
> +>location '/user/trafodion/hive/exttables/test1';
> --- SQL operation complete.
> >>
> >>select count(*) from hive.hive.test1;
> (EXPR) 
> --------------------
> 0
> --- 1 row(s) selected.
> >>
> >>-- should fail with error 1387, but reports success
> >>create external table hive.hive.test1
> +>( a date, b char(20) )
> +>row format delimited fields terminated by '|' 
> +>location '/user/trafodion/hive/exttables/test1';
> --- SQL operation complete.
> >>exit;
> End of MXCI Session
> {quote}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)