Hi All,

Noticed following issue in siddhi

1. Aggregated functions like avg(), max(), sum() etc gives casting error.

Query:
from ApiExeTime within 0L, 2591125111000L per 'minutes' select apiName,
max(responseTime) as time group by apiName

Error:
"message": "Cannot query: Error executing 'store_select_query_ApiExeTime',
java.lang.Long cannot be cast to java.lang.Double"

But if we multiply by another number, it is working fine. ex:
"max(responseTime * 1) as time"


2. Cannot reuse the alias defined in the select

Query:

from ApiExeTime within 0L, 2591125111000L per 'minutes' select apiName,
max(serviceTime * 1) as service, max(backendTime * 1) as backend , (service
+ backend) as responseTime group by apiName

Here service and backend alias are already defined in the same query. But
when it tries to reuse it is not found. If we modify the query as below, it
is working.

(max(serviceTime * 1) + max(backendTime * 1)) as responseTime

But it looks like we do the same computation again and not use the already
computed value.


It looks like this is an issue with siddhi. Is this fixed in the latest
versions or can we fix this?

Thanks and Regards
-- 
Rukshan C. Premathunga | Associate Technical Lead | WSO2 Inc.
(m) +94711822074 | (w) +94112145345 | Email: [email protected]
GET INTEGRATION AGILE
Integration Agility for Digitally Driven Business
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to