Skip to content

[Optimizer] Eliminate self compare self #2252

@jackwener

Description

@jackwener

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Eliminate self compare self.

select * from t1 where c1 = c1;
-- infer is not null -->
select * from t1 where c1 = c1 and c1 is not null;
-- this rule to eliminate self compare -->
select * from t1 where c1 is not null;

Describe the solution you'd like
It depend on infer is not null from where clause;

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions