Skip to content

ProjectionPushDown rule don't consider the alias in projection. #4174

@jackwener

Description

@jackwener

Describe the bug

It's from #4141

when just need c1, but due to alias, projection will contains c1 and its alias column(if exists).

like tablescan include c1, c2, if we project c1 as c2, projection include [c1, c2].

It's because the pushdown project rule don't handle alias. In fact, when handle projection with alias, we need replace the alias column in new_required_columns, but if we see the code of this rule, we can find that it didn't consider alias.

For example:

project c1 as c2
    tablescan c1.

when we meet project c1 as c2, if new_required_columns include c2, we need replace it with c1.

It's a future ticket, I have debug this rule, I will try to fix it.

To Reproduce
Steps to reproduce the behavior:

Expected behavior
A clear and concise description of what you expected to happen.

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions