Skip to content

Question: why is DISTINCT ignored in the query AST #24

Open
@sebastian

Description

Your SQL parser parses the distinct keyword (when used in the context of a list of columns being selected), but does not retain it in the purposes of the AST.

As an example, take the following test where the query

SELECT DISTINCT username, user_id FROM users

is parsed into the following list of columns, losing the distinct keyword in the process:

[Expr.Ident "username"; Expr.Ident "user_id"]

Is this an artefact of your analyzer not needing the distinct keyword in order to do its type checking? In other words, is this a conscious omission?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions