You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@iotdb.apache.org by "Zhong Wang (Jira)" <ji...@apache.org> on 2021/10/22 08:02:00 UTC

[jira] [Created] (IOTDB-1875) Cast exception on invalid nested aggregation function call

Zhong Wang created IOTDB-1875:
---------------------------------

             Summary: Cast exception on invalid nested aggregation function call
                 Key: IOTDB-1875
                 URL: https://issues.apache.org/jira/browse/IOTDB-1875
             Project: Apache IoTDB
          Issue Type: Improvement
            Reporter: Zhong Wang


For queries like SELECT first_value(abs(s1)) from root.sg.d1, the following exception will be thrown:

java.lang.ClassCastException: org.apache.iotdb.db.query.expression.unary.FunctionExpression cannot be cast to org.apache.iotdb.db.query.expression.unary.TimeSeriesOperand
 at org.apache.iotdb.db.qp.logical.crud.SelectComponent.getPaths(SelectComponent.java:100)
 at org.apache.iotdb.db.qp.logical.crud.QueryOperator.generateRawDataQueryPlan(QueryOperator.java:193)
 at org.apache.iotdb.db.qp.logical.crud.GroupByQueryOperator.generatePhysicalPlan(GroupByQueryOperator.java:36)
 at org.apache.iotdb.db.qp.strategy.PhysicalGenerator.transformToPhysicalPlan(PhysicalGenerator.java:39)
 at org.apache.iotdb.db.qp.Planner.parseSQLToPhysicalPlan(Planner.java:62)
 at org.apache.iotdb.db.service.TSServiceImpl.executeStatement(TSServiceImpl.java:607)

 

According to the implementation, the argument of built-in aggregation functions must be a time series, but this constraint is not checked.

 

I will fix this issue.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)