drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-5952) Implement "CREATE TABLE IF NOT EXISTS"
Date Wed, 22 Nov 2017 14:46:00 GMT

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

ASF GitHub Bot commented on DRILL-5952:
---------------------------------------

Github user arina-ielchiieva commented on a diff in the pull request:

    https://github.com/apache/drill/pull/1033#discussion_r152579484
  
    --- Diff: exec/java-exec/src/main/codegen/includes/parserImpls.ftl ---
    @@ -215,11 +223,12 @@ SqlNode SqlDropView() :
     
     /**
      * Parses a CTAS or CTTAS statement.
    - * CREATE [TEMPORARY] TABLE tblname [ (field1, field2, ...) ] AS select_statement.
    + * CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tblname [ (field1, field2, ...) ] AS select_statement.
      */
     SqlNode SqlCreateTable() :
     {
         SqlParserPos pos;
    +    boolean tableNonExistenceCheck = false;
    --- End diff --
    
    Not critical but I am in favor of adding new parameters in the end. Of course if logically
it is not required.


> Implement "CREATE TABLE IF NOT EXISTS"
> --------------------------------------
>
>                 Key: DRILL-5952
>                 URL: https://issues.apache.org/jira/browse/DRILL-5952
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: SQL Parser
>    Affects Versions: 1.11.0
>            Reporter: Prasad Nagaraj Subramanya
>            Assignee: Prasad Nagaraj Subramanya
>             Fix For: Future
>
>
> Currently, if a table/view with the same name exists CREATE TABLE fails with VALIDATION
ERROR
> Having "IF NOT EXISTS" support for CREATE TABLE will ensure that query succeeds 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message