Victoria Markman created DRILL-3615:
---------------------------------------
Summary: User exception should be thrown instead of SYSTEM ERORR
if invalid type is passed to statistical aggregate function
Key: DRILL-3615
URL: https://issues.apache.org/jira/browse/DRILL-3615
Project: Apache Drill
Issue Type: Bug
Components: Functions - Drill
Affects Versions: 1.2.0
Reporter: Victoria Markman
Assignee: Mehant Baid
They all throw different exceptions. Variance, for example, throws something
indigestible, see below:
{code}
0: jdbc:drill:schema=dfs> select variance(c_timestamp) over w from j1 WINDOW w
as ();
Error: SYSTEM ERROR: CompileException: Line 58, Column 43: A method named
"getContext" is not declared in any enclosing class nor any supertype, nor
through a static import
Fragment 0:0
[Error Id: c1ce25f2-9c28-42a3-aeba-2fb394d253c5 on atsqa4-133.qa.lab:31010]
(state=,code=0)
0: jdbc:drill:schema=dfs> select variance(c_date) over w from j1 WINDOW w as ();
Error: SYSTEM ERROR: CompileException: Line 58, Column 43: A method named
"getContext" is not declared in any enclosing class nor any supertype, nor
through a static import
Fragment 0:0
[Error Id: dd45b047-a962-4f3a-a0eb-224f28eb422d on atsqa4-133.qa.lab:31010]
(state=,code=0)
0: jdbc:drill:schema=dfs> select variance(c_time) over w from j1 WINDOW w as ();
Error: SYSTEM ERROR: CompileException: Line 58, Column 43: A method named
"getContext" is not declared in any enclosing class nor any supertype, nor
through a static import
Fragment 0:0
[Error Id: 2a80d5ae-f934-4162-9387-00a6475896be on atsqa4-133.qa.lab:31010]
(state=,code=0)
0: jdbc:drill:schema=dfs> select variance(c_timestamp) over w from j1 WINDOW w
as ();
Error: SYSTEM ERROR: CompileException: Line 58, Column 43: A method named
"getContext" is not declared in any enclosing class nor any supertype, nor
through a static import
Fragment 0:0
[Error Id: 7948329f-80fd-4519-b6f7-ed3ee419b70f on atsqa4-133.qa.lab:31010]
(state=,code=0)
0: jdbc:drill:schema=dfs> select variance(c_boolean) over w from j1 WINDOW w as
();
Error: SYSTEM ERROR: CompileException: Line 92, Column 163: Unknown variable or
type "logger"
Fragment 0:0
[Error Id: 7bb2bf3a-46f5-4a9e-b47d-404530b81443 on atsqa4-133.qa.lab:31010]
(state=,code=0)
{code}
stddev_pop, stddev_samp seem to throw runtime exception:
{code}
0: jdbc:drill:schema=dfs> select stddev_pop(c_time) over w from j1 WINDOW w as
();
Error: SYSTEM ERROR: SchemaChangeException: Failure while trying to materialize
incoming schema. Errors:
Error in expression at index -1. Error: Missing function implementation:
[multiply(TIME-OPTIONAL, TIME-OPTIONAL)]. Full expression: --UNKNOWN
EXPRESSION--..
Fragment 0:0
[Error Id: d0b0fa1e-83f3-4843-81b9-231d01289153 on atsqa4-133.qa.lab:31010]
(state=,code=0)
0: jdbc:drill:schema=dfs> select stddev_samp(c_time) over w from j1 WINDOW w as
();
Error: SYSTEM ERROR: SchemaChangeException: Failure while trying to materialize
incoming schema. Errors:
Error in expression at index -1. Error: Missing function implementation:
[multiply(TIME-OPTIONAL, TIME-OPTIONAL)]. Full expression: --UNKNOWN
EXPRESSION--..
Fragment 0:0
[Error Id: 474ba7b7-3b88-4116-b3d3-d7bf78bc84d4 on atsqa4-133.qa.lab:31010]
(state=,code=0)
{code}
It will be really nice to have some nice user exception, which is somewhat
expected and more understandable:
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)