[
https://issues.apache.org/jira/browse/ASTERIXDB-1396?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15239649#comment-15239649
]
Xi Zhang commented on ASTERIXDB-1396:
-------------------------------------
Thanks!!
> sum function used after group by throws error
> ---------------------------------------------
>
> Key: ASTERIXDB-1396
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-1396
> Project: Apache AsterixDB
> Issue Type: Bug
> Reporter: Xi Zhang
>
> Here is my query:
> for $t in dataset TripData
> group by $timebin := interval-bin($t.tpep_dropoff_datetime,
> datetime("2013-01-01T00:00:00.000"), day-time-duration("PT2H")) with $t
> let $num := sum($t.passenger_count)
> return { "time_interval": $timebin, "count": $num}
> *Error message is:*
> Unsupported type [ TripDataType: closed {
> id: UUID,
> vendor_id: INT8,
> tpep_pickup_datetime: DATETIME,
> tpep_dropoff_datetime: DATETIME,
> passenger_count: INT8
> ...
> }
> ] for field access expression: function-call: asterix:field-access-by-name,
> Args:[%0->$$9, AString: {passenger_count}] [AlgebricksException]
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)