Skip to content

About optimize result when query #110

@hdlinh1808

Description

@hdlinh1808

When I parse this query:
select vpc_id from aws_ec2_instance where not not not vpc_id IS NULL
it returns a lot of bool operator, how I can remove redudant:

{"version":160001,"stmts":[{"stmt":{"SelectStmt":{"targetList":[{"ResTarget":{"val":{"ColumnRef":{"fields":[{"String":{"sval":"vpc_id"}}],"location":7}},"location":7}}],"fromClause":[{"RangeVar":{"relname":"aws_ec2_instance","inh":true,"relpersistence":"p","location":19}}],"whereClause":{"BoolExpr":{"boolop":"NOT_EXPR","args":[{"BoolExpr":{"boolop":"NOT_EXPR","args":[{"BoolExpr":{"boolop":"NOT_EXPR","args":[{"NullTest":{"arg":{"ColumnRef":{"fields":[{"String":{"sval":"vpc_id"}}],"location":54}},"nulltesttype":"IS_NULL","location":61}}],"location":50}}],"location":46}}],"location":42}},"limitOption":"LIMIT_OPTION_DEFAULT","op":"SETOP_NONE"}}}]}

Thanks

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