Skip to content

"group by ()" cause parsing exception #1176

@xsgao-github

Description

@xsgao-github

Describe the bug
Cannot parse this statement select sum(c) from t group by ().

To Reproduce
Steps to reproduce the behavior:

  1. net.sf.jsqlparser.parser.CCJSqlParserUtil.parse("select sum(c) from t group by ()")
  2. Exception - Caused by: net.sf.jsqlparser.parser.ParseException: Encountered " "(" "( "" at line 1, column 31.

Expected behavior
Not sure if group by () is SQL compliant, but tested on SQL/PostgreSQL, they both support it.

System

  • Database you are using - SQL/PostgreSQL
  • Java Version - 1.8
  • JSqlParser version - 4.0

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