drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prasadns14 <...@git.apache.org>
Subject [GitHub] drill pull request #1033: DRILL-5952: Implement "CREATE TABLE IF NOT EXISTS"
Date Fri, 17 Nov 2017 06:55:10 GMT
Github user prasadns14 commented on a diff in the pull request:

    https://github.com/apache/drill/pull/1033#discussion_r151613897
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/handlers/CreateTableHandler.java
---
    @@ -83,7 +84,20 @@ public PhysicalPlan getPlan(SqlNode sqlNode) throws ValidationException,
RelConv
         final DrillConfig drillConfig = context.getConfig();
         final AbstractSchema drillSchema = resolveSchema(sqlCreateTable, config.getConverter().getDefaultSchema(),
drillConfig);
     
    -    checkDuplicatedObjectExistence(drillSchema, originalTableName, drillConfig, context.getSession());
    +    String schemaPath = drillSchema.getFullSchemaName();
    +
    +    // Check duplicate object existence
    +    boolean isTemporaryTable = context.getSession().isTemporaryTable(drillSchema, drillConfig,
originalTableName);
    --- End diff --
    
    1) Added unit tests for temp tables
    2) Implemented for views as well


---

Mime
View raw message