Skip to content

Make NOT EXISTS (subquery) and NOT IN (subquery) more consistent in the AST #472

@andygrove

Description

@andygrove

The AST has one variant to support both IN (subquery) and NOT IN (subquery):

InSubquery {
    expr: Box<Expr>,
    subquery: Box<Query>,
    negated: bool,
},

However, the variant for EXISTS does not handle NOT EXISTS:

Exists(Box<Query>)

NOT EXISTS is represented in the AST by wrapping Exists in a UnaryOp with UnaryOperator::Not.

It would be nice if we could use a more consistent approach.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions