Skip to content

Syntax error in SiddhiQL, no viable alternative at input '"2014-02-15 **:**:** +05:30'. #1821

@Nero7788

Description

@Nero7788

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions