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-4956) Temporary tables support
Date Tue, 17 Jan 2017 22:17:26 GMT

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

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

Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/666#discussion_r96509598
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/SchemaUtilites.java
---
    @@ -177,4 +186,34 @@ public static AbstractSchema resolveToMutableDrillSchema(final SchemaPlus
defaul
     
         return drillSchema;
       }
    +
    +  /**
    +   * Looks in schema tree for default temporary workspace instance.
    +   * Makes sure that temporary workspace is mutable and file-based
    +   * (instance of {@link WorkspaceSchemaFactory.WorkspaceSchema}).
    +   *
    +   * @param defaultSchema default schema
    +   * @param config drill config
    +   * @return default temporary workspace
    +   */
    +  public static AbstractSchema getTemporaryWorkspace(SchemaPlus defaultSchema, DrillConfig
config) {
    +    List<String> temporarySchemaPath = Lists.newArrayList(config.getString(ExecConstants.DEFAULT_TEMPORARY_WORKSPACE));
    +    AbstractSchema temporarySchema = resolveToMutableDrillSchema(defaultSchema, temporarySchemaPath);
    +    if (!(temporarySchema instanceof WorkspaceSchemaFactory.WorkspaceSchema)) {
    +      DrillRuntimeException.format("Temporary workspace [%s] must be file-based, instance
of " +
    +          "WorkspaceSchemaFactory.WorkspaceSchema", temporarySchemaPath);
    +    }
    +    return temporarySchema;
    +  }
    +
    +  /**
    +   * Checks that passed schema path is the same as temporary workspace path.
    +   *
    +   * @param schemaPath schema path
    +   * @param config drill config
    +   * @return true is schema path corresponds to temporary workspace, false otherwise
    +   */
    +  public static boolean isTemporaryWorkspace(String schemaPath, DrillConfig config) {
    --- End diff --
    
    When matching the temp workspace name, should the names be... case sensitive or case insensitive?
These are name spaces we define (like column or table aliases), so should they follow the
SQL rules or file system rules?


> Temporary tables support
> ------------------------
>
>                 Key: DRILL-4956
>                 URL: https://issues.apache.org/jira/browse/DRILL-4956
>             Project: Apache Drill
>          Issue Type: Improvement
>    Affects Versions: 1.8.0
>            Reporter: Arina Ielchiieva
>            Assignee: Arina Ielchiieva
>              Labels: doc-impacting
>             Fix For: Future
>
>
> Link to design doc - https://docs.google.com/document/d/1gSRo_w6q2WR5fPx7SsQ5IaVmJXJ6xCOJfYGyqpVOC-g/edit



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

Mime
View raw message