You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Khurram Faraaz (JIRA)" <ji...@apache.org> on 2015/07/02 21:54:05 UTC
[jira] [Created] (DRILL-3456) Need support for default values for
column in CTAS
Khurram Faraaz created DRILL-3456:
-------------------------------------
Summary: Need support for default values for column in CTAS
Key: DRILL-3456
URL: https://issues.apache.org/jira/browse/DRILL-3456
Project: Apache Drill
Issue Type: Improvement
Components: Execution - Data Types
Affects Versions: 1.1.0
Reporter: Khurram Faraaz
Assignee: Daniel Barclay (Drill)
Priority: Minor
Drill does not allow assigning of default values to columns in CTAS. We should support default values for columns.
DATATYPE column-name DEFAULT value
{code}
0: jdbc:drill:schema=dfs.tmp> CREATE TABLE TBL_DFLT_NULL(col1 default null) AS SELECT cast(columns[1] as char(1)) col1 from `deflt_Null.csv`;
Error: PARSE ERROR: Encountered "default" at line 1, column 33.
Was expecting one of:
")" ...
"," ...
[Error Id: db98f32e-27ac-47c5-b5c7-4dc33f288b58 on centos-03.qa.lab:31010] (state=,code=0)
0: jdbc:drill:schema=dfs.tmp> CREATE TABLE TBL_DFLT_NULL(col1 null) AS SELECT cast(columns[1] as char(1)) col1 from `deflt_Null.csv`;
Error: PARSE ERROR: Encountered "null" at line 1, column 33.
Was expecting one of:
")" ...
"," ...
[Error Id: 69021eff-b65c-4db8-8628-8650a569175a on centos-03.qa.lab:31010] (state=,code=0)
0: jdbc:drill:schema=dfs.tmp> CREATE TABLE TBL_DFLT_NULL(col1) AS SELECT cast(columns[1] as char(1)) col1 default null from `deflt_Null.csv`;
Error: PARSE ERROR: Encountered "default" at line 1, column 77.
Was expecting one of:
"FROM" ...
"," ...
[Error Id: ebec6600-82b0-4c87-ad9d-756ecd1b9095 on centos-03.qa.lab:31010] (state=,code=0)
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)