Skip to content

The duplicate slot maybe produce by planner when select constant stmt #4900

@EmmyMiao87

Description

@EmmyMiao87

Describe the bug
The duplicate slot maybe produce by planner when select constant stmt

select 1 from test where k1=1
A slot will be added in tuple when tuple's materialized slots is empty.

select 1, k1 from test where k1=1

But k1 is duplicated with the column k1 in where clause.
This will cause the predicate to be incorrectly pushed down to the storage engine when the query is executed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/plannerIssues or PRs related to the query plannerkind/fixCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions