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

Khurram Faraaz commented on DRILL-5238:
---------------------------------------

Verified on Drill 1.10.0 commit ID : 300e9349

{noformat}
apache drill 1.10.0-SNAPSHOT
"a drill is a terrible thing to waste"
0: jdbc:drill:schema=dfs.tmp> use dfs;
+-------+----------------------------------+
|  ok   |             summary              |
+-------+----------------------------------+
| true  | Default schema changed to [dfs]  |
+-------+----------------------------------+
1 row selected (0.367 seconds)
0: jdbc:drill:schema=dfs.tmp> create temporary table tmp.t as select 'A' from 
(values(1));
+-----------+----------------------------+
| Fragment  | Number of records written  |
+-----------+----------------------------+
| 0_0       | 1                          |
+-----------+----------------------------+
1 row selected (0.486 seconds)
0: jdbc:drill:schema=dfs.tmp> select * from tmp.t;
+---------+
| EXPR$0  |
+---------+
| A       |
+---------+
1 row selected (0.21 seconds)
0: jdbc:drill:schema=dfs.tmp>
{noformat}

> 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)

Reply via email to