-
Notifications
You must be signed in to change notification settings - Fork 529
Syntax error in SiddhiQL, no viable alternative at input '"2014-02-15 **:**:** +05:30'. #1821
Copy link
Copy link
Open
Description
Description:
The example from this link failed to run: https://siddhi.io/en/v5.1/docs/query-guide/#select-named-aggregation
define stream TradeStream (symbol string, price double, volume long, timestamp long);
define aggregation TradeAggregation
from TradeStream
select symbol, avg(price) as avgPrice, sum(price) as total
group by symbol
aggregate by timestamp every sec ... year;
from TradeAggregation
on symbol == "FB"
within "2014-02-15 **:**:** +05:30"
per "hours"
select symbol, total, avgPrice;
Affected Siddhi Version:
siddhi-tooing5.1.2
and siddhi-core-5.1.11
OS, DB, other environment details and versions:
Steps to reproduce:
Java code like:
String app1 = "define stream TradeStream (symbol string, price double, volume long, timestamp long);" +
" " +
"define aggregation TradeAggregation from TradeStream select symbol, avg(price) as avgPrice, sum(price) as total group by symbol aggregate by timestamp every sec ... year;"+
" " +
// "from TradeAggregation on symbol == \"FB\" within \"2014-02-15 **:**:** +05:30\" per \"hours\" select symbol, total, avgPrice;";
"from TradeAggregation within \"2014-02-15 00:00:00 +05:30\", \"2014-03-16 00:00:00 +05:30\" per \"days\" select symbol, total, avgPrice;";
// "from TradeAggregation within \"2014-02-15 00:00:00 +05:30\", \"2014-03-16 00:00:00 +05:30\" per \"days\" select symbol, total, avgPrice;";
//Generate runtime
SiddhiAppRuntime siddhiAppRuntime = siddhiManager.createSiddhiAppRuntime(app1);
Related Issues:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels