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

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

Github user vdiravka commented on a diff in the pull request:

    https://github.com/apache/drill/pull/541#discussion_r70099210
  
    --- Diff: exec/java-exec/src/main/codegen/includes/parserImpls.ftl ---
    @@ -245,15 +247,17 @@ SqlNode SqlCreateTable() :
      * Parses a drop table statement.
      * DROP TABLE table_name;
      */
    -SqlNode SqlDropTable() :
    +SqlNode SqlDropTableIfExists() :
     {
         SqlParserPos pos;
    +    boolean tableExistenceCheck = false;
     }
     {
         <DROP> { pos = getPos(); }
         <TABLE>
    +    [ <IF> <EXISTS> { tableExistenceCheck = true; } ]
         {
    -        return new SqlDropTable(pos, CompoundIdentifier());
    +        return new SqlDropTable(pos, CompoundIdentifier(), 
tableExistenceCheck);
    --- End diff --
    
    Done in a new commit.


> Implement "DROP TABLE IF EXISTS" for drill to prevent FAILED status on 
> command return
> -------------------------------------------------------------------------------------
>
>                 Key: DRILL-4673
>                 URL: https://issues.apache.org/jira/browse/DRILL-4673
>             Project: Apache Drill
>          Issue Type: New Feature
>          Components: Functions - Drill
>            Reporter: Vitalii Diravka
>            Assignee: Vitalii Diravka
>            Priority: Minor
>              Labels: drill
>
> Implement "DROP TABLE IF EXISTS" for drill to prevent FAILED status on 
> command "DROP TABLE" return if table doesn't exist.
> The same for "DROP VIEW IF EXISTS"



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to