Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jackwener opened this issue Nov 11, 2022 · 1 comment · Fixed by #4487
Closed

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

jackwener opened this issue Nov 11, 2022 · 1 comment · Fixed by #4487
Labels
bug Something isn't working

Comments

@jackwener
Copy link
Member

jackwener commented Nov 11, 2022

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.

@jackwener jackwener added the bug Something isn't working label Nov 11, 2022
@liukun4515
Copy link
Contributor

@jackwener related issue: #3635

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants