Skip to content

[Enhancement] (planner) change Doris's query organization syntax to standard sql #9740

@morrySnow

Description

@morrySnow

Search before asking

  • I had searched in the issues and found no similar issues.

Description

Current, we process order by and limit in Doris only way:
https://github.com/apache/incubator-doris/blob/d97e2b1eb21b1026ef95f0cb5b87e0138c704de8/fe/fe-core/src/main/cup/sql_parser.cup#L3174-L3191

I think we need to change it behavior to standard SQL. query organization need to be executed at last.

Solution

change syntax to match standard sql:

query = ctes? set_operand_list order_by limit
set_operand_list = set_operand | set_operand_list set_op set_operand
set_operand = selectClause fromClause? whereClause? aggregationClause? havingClause?
    | values
    | LEFT_PAREN query RIGHT_PAREN

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/plannerIssues or PRs related to the query planner

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions