drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paul-rogers <...@git.apache.org>
Subject [GitHub] drill pull request #666: DRILL-4956: Temporary tables support
Date Thu, 05 Jan 2017 02:33:58 GMT
Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/666#discussion_r94643225
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/handlers/CreateTableHandler.java
---
    @@ -67,43 +71,64 @@ public CreateTableHandler(SqlHandlerConfig config, Pointer<String>
textPlan) {
       @Override
       public PhysicalPlan getPlan(SqlNode sqlNode) throws ValidationException, RelConversionException,
IOException, ForemanSetupException {
         SqlCreateTable sqlCreateTable = unwrap(sqlNode, SqlCreateTable.class);
    -    final String newTblName = sqlCreateTable.getName();
    +    String originalTableName = sqlCreateTable.getName();
     
         final ConvertedRelNode convertedRelNode = validateAndConvert(sqlCreateTable.getQuery());
         final RelDataType validatedRowType = convertedRelNode.getValidatedRowType();
         final RelNode queryRelNode = convertedRelNode.getConvertedNode();
     
    -
         final RelNode newTblRelNode =
             SqlHandlerUtil.resolveNewTableRel(false, sqlCreateTable.getFieldNames(), validatedRowType,
queryRelNode);
     
    +    final String temporaryWorkspace = context.getConfig().getString(ExecConstants.DEFAULT_TEMPORARY_WORKSPACE);
    +
         final AbstractSchema drillSchema =
             SchemaUtilites.resolveToMutableDrillSchema(config.getConverter().getDefaultSchema(),
    -            sqlCreateTable.getSchemaPath());
    -    final String schemaPath = drillSchema.getFullSchemaName();
    +                getSchemaPath(sqlCreateTable, temporaryWorkspace));
    +
    +    boolean isTemporaryWorkspace = drillSchema.getFullSchemaName().equals(temporaryWorkspace);
    --- End diff --
    
    Drill follows the SQL convention of case-insensitive names, correct? Should this be `equalsIgnoreCase`?
Else, we could have converted all names to a fixed case (upper?), but I don't see that code
anywhere...
    
    I've caught a few of these; please track down any others that may need adjustment.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message