Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 1431E200C01 for ; Thu, 5 Jan 2017 03:35:01 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 12E3E160B47; Thu, 5 Jan 2017 02:35:01 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 11DC3160B4C for ; Thu, 5 Jan 2017 03:34:59 +0100 (CET) Received: (qmail 55350 invoked by uid 500); 5 Jan 2017 02:34:59 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 55304 invoked by uid 99); 5 Jan 2017 02:34:59 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jan 2017 02:34:59 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id DFFBE2C2A6E for ; Thu, 5 Jan 2017 02:34:58 +0000 (UTC) Date: Thu, 5 Jan 2017 02:34:58 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-4956) Temporary tables support MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 05 Jan 2017 02:35:01 -0000 [ https://issues.apache.org/jira/browse/DRILL-4956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15800062#comment-15800062 ] 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_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 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. > 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)