You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Victoria Markman (JIRA)" <ji...@apache.org> on 2015/01/03 00:59:34 UTC
[jira] [Created] (DRILL-1924) Unexpected exception in TRUNC
function when unsupported data type is passed in
Victoria Markman created DRILL-1924:
---------------------------------------
Summary: Unexpected exception in TRUNC function when unsupported data type is passed in
Key: DRILL-1924
URL: https://issues.apache.org/jira/browse/DRILL-1924
Project: Apache Drill
Issue Type: Bug
Components: Functions - Drill
Affects Versions: 0.8.0
Reporter: Victoria Markman
t.json
{code}
{ "a1": 0, "b1": 0, "c1": "true", "d1" : "2015-01-02"}
{ "a1": 0, "b1": 0, "c1": "false" , "d1" : "2015-01-03"}
{ "a1": 0, "b1": 0, "c1": "false" , "d1" : "2015-01-04"}
{ "a1": 1, "b1": 1, "c1": "true" , "d1" : "2015-01-05"}
{ "a1": 1, "b1": 1, "c1": "true" , "d1" : "2015-01-06"}
{code}
{code}
0: jdbc:drill:schema=dfs> select trunc(c1) from `t.json`;
Query failed: Query stopped., Failure while trying to materialize incoming schema. Errors:
Error in expression at index -1. Error: Missing function implementation: [castTINYINT(VARCHAR-OPTIONAL)]. Full expression: --UNKNOWN EXPRESSION--.. [ 8fa0b28d-da4a-4c73-81df-823033dedc35 on atsqa4-133.qa.lab:31010 ]
Error: exception while executing query: Failure while executing query. (state=,code=0)
0: jdbc:drill:schema=dfs> select trunc(cast(d1 as timestamp)) from `t.json`;
Query failed: Query stopped., Failure while trying to materialize incoming schema. Errors:
Error in expression at index -1. Error: Missing function implementation: [trunc(TIMESTAMP-OPTIONAL)]. Full expression: --UNKNOWN EXPRESSION--.. [ 2a6783c4-e111-47dc-ba67-a767a111e3a9 on atsqa4-133.qa.lab:31010 ]
Error: exception while executing query: Failure while executing query. (state=,code=0)
0: jdbc:drill:schema=dfs> select trunc(cast(d1 as date)) from `t.json`;
Query failed: Query stopped., Failure while trying to materialize incoming schema. Errors:
Error in expression at index -1. Error: Missing function implementation: [trunc(DATE-OPTIONAL)]. Full expression: --UNKNOWN EXPRESSION--.. [ 65de17df-5c57-44e0-b5ea-653d0ad6afb9 on atsqa4-133.qa.lab:31010 ]
Error: exception while executing query: Failure while executing query. (state=,code=0)
{code}
It also "works" on boolean data type, whatever it means ...
{code}
0: jdbc:drill:schema=dfs> select cast(c1 as boolean) from `t.json`;
+------------+
| EXPR$0 |
+------------+
| true |
| false |
| false |
| true |
| true |
+------------+
5 rows selected (0.066 seconds)
{code}
TRUNC function is listed in external documentation as math function.
Please throw an error message when any other data type is passed in.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)