You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/02/02 14:22:51 UTC
[jira] [Commented] (DRILL-5238) CTTAS: unable to resolve temporary
table if workspace is indicated without schema
[ https://issues.apache.org/jira/browse/DRILL-5238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15849962#comment-15849962 ]
ASF GitHub Bot commented on DRILL-5238:
---------------------------------------
GitHub user arina-ielchiieva opened a pull request:
https://github.com/apache/drill/pull/736
DRILL-5238: CTTAS: unable to resolve temporary table if workspace is …
…indicated without schema
1. Added additional check for passed table is temporary if default workspace is partially indicated (issue is described in Jira DRILL-5238).
2. Removed `UserSession.getDefaultSchemaName()` method as it contained exactly the same logic as `UserSession.getDefaultSchemaPath()`.
3. Since `UserSession.properties` are set using builder, they are not required but when not set, they may cause NPE when `UserSession.getProp()` method is called. Moved `UserSession.properties` into constructor.
4. Unit test for partial schema usage with temporary table.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/arina-ielchiieva/drill DRILL-5238
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/drill/pull/736.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #736
----
commit a787c6c2b49de6b8114f028864ff8d67cc5989be
Author: Arina Ielchiieva <ar...@gmail.com>
Date: 2017-02-02T11:47:19Z
DRILL-5238: CTTAS: unable to resolve temporary table if workspace is indicated without schema
----
> CTTAS: unable to resolve temporary table if workspace is indicated without schema
> ---------------------------------------------------------------------------------
>
> Key: DRILL-5238
> URL: https://issues.apache.org/jira/browse/DRILL-5238
> Project: Apache Drill
> Issue Type: Bug
> Affects Versions: 1.10.0
> Reporter: Arina Ielchiieva
> Assignee: Arina Ielchiieva
> Fix For: 1.10.0
>
>
> Drill is unable to resolve temporary table if default temporary workspace is partially indicated (schema was set using USE command and only workspace name is used in query).
> {noformat}
> 0: jdbc:drill:zk=local> use dfs;
> +-------+----------------------------------+
> | ok | summary |
> +-------+----------------------------------+
> | true | Default schema changed to [dfs] |
> +-------+----------------------------------+
> 1 row selected (0.156 seconds)
> 0: jdbc:drill:zk=local> create temporary table tmp.t as select 'A' from (values(1));
> +-----------+----------------------------+
> | Fragment | Number of records written |
> +-----------+----------------------------+
> | 0_0 | 1 |
> +-----------+----------------------------+
> 1 row selected (1.525 seconds)
> 0: jdbc:drill:zk=local> select * from tmp.t;
> Feb 02, 2017 11:24:09 AM org.apache.calcite.sql.validate.SqlValidatorException <init>
> SEVERE: org.apache.calcite.sql.validate.SqlValidatorException: Table 'tmp.t' not found
> Feb 02, 2017 11:24:09 AM org.apache.calcite.runtime.CalciteException <init>
> SEVERE: org.apache.calcite.runtime.CalciteContextException: From line 1, column 15 to line 1, column 17: Table 'tmp.t' not found
> Error: VALIDATION ERROR: From line 1, column 15 to line 1, column 17: Table 'tmp.t' not found
> SQL Query null
> [Error Id: 5266cb67-9d37-4a94-9a4e-28a4a2f94be5 on localhost:31010] (state=,code=0)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)