This is really not a bug. Since AircraftStatus.duration is a Dimension (e.g. each value can have a different unit), the db engine can’t send the query to the database since it wouldn’t know how to do the math involving unit conversions so it gets evaluated by the expression engine. Since the expression engine can’t do grouping you get this error. In this case, I’m assuming that the duration values are all of the same unit. Assuming that, you can do the query as follows:
projection: “sum(duration.value), location”,
This will send the query to the database and do unitless math on the sum. If the durations are all the same unit, perhaps that field could have just been an appropriate numeric type rather than a dimension. If that were the case, you wouldn’t run into this.