You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Khurram Faraaz (JIRA)" <ji...@apache.org> on 2016/10/19 18:16:58 UTC
[jira] [Created] (DRILL-4952) AVG() returns
SchemaChangeException
Khurram Faraaz created DRILL-4952:
-------------------------------------
Summary: AVG(<INTERVAL type>) returns SchemaChangeException
Key: DRILL-4952
URL: https://issues.apache.org/jira/browse/DRILL-4952
Project: Apache Drill
Issue Type: Bug
Components: Execution - Flow
Affects Versions: 1.9.0
Reporter: Khurram Faraaz
We need to fix the documentation if this is not supported, otherwise we need to fix the AVG function to accept INTERVAL type input.
As per Drill's documentation we say that AVG aggregate function accepts INTERVAL type as input
https://drill.apache.org/docs/aggregate-and-aggregate-statistical/
However, the below query fails when INTERVAL type value is passed as input to AVG function
{noformat}
0: jdbc:drill:schema=dfs.tmp> SELECT AVG(CAST(columns[0] AS INTERVAL YEAR)) from `durations.csv`;
Error: SYSTEM ERROR: SchemaChangeException: Failure while materializing expression.
Error in expression at index -1. Error: Missing function implementation: [$sum0(INTERVALYEAR-OPTIONAL)]. Full expression: --UNKNOWN EXPRESSION--.
Fragment 0:0
[Error Id: 522f55c7-809a-4cf1-a926-3281f9837636 on centos-01.qa.lab:31010] (state=,code=0)
{noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)