"SELECT COUNT(*) FILTER (WHERE timestampColumn > '2021-01-01),
timestampColumn FROM testTable WHERE timestampColumn > '2021-01-01"
+ "00:00:00.123' GROUP BY timestampColumn"
There's a semicolon missing.
On Mon, Sep 27, 2021 at 4:34 PM Atri Sharma <[email protected]> wrote:
> Using the Babel parser, I get an error while parsing the following query:
>
> "SELECT COUNT(*) FILTER (WHERE timestampColumn > '2021-01-01),
> timestampColumn FROM testTable WHERE timestampColumn > '2021-01-01"
> + "00:00:00.123' GROUP BY timestampColumn"
>
> The exception raised is:
>
> Caused by: org.apache.calcite.sql.parser.SqlParseException:
> Encountered "2021" at line 1, column 119.
> Was expecting one of:
> ")" ...
> "." ...
> <QUOTED_STRING> ...
> "UESCAPE" ...
> "NOT" ...
> "IN" ...
> "<" ...
> "<=" ...
> ">" ...
> ">=" ...
> "=" ...
> "<>" ...
> "!=" ...
> "BETWEEN" ...
> "LIKE" ...
> "SIMILAR" ...
> "+" ...
> "-" ...
> "*" ...
> "/" ...
>
> What am I missing, please?
>
>
> --
> Regards,
>
> Atri
> l'apprenant
>