Skip to content

Conversation

@goldmedal
Copy link
Contributor

Which issue does this PR close?

It's a follow-up of #13006

Rationale for this change

What changes are included in this PR?

We missed the good suggestions from @phillipleblanc #13006 (comment)
They make sense to me 👍

Are these changes tested?

the original tests.

Are there any user-facing changes?

no

@github-actions github-actions bot added the sql SQL Planner label Oct 22, 2024
Copy link
Contributor

@phillipleblanc phillipleblanc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the follow-on PR!

builder = builder.alias(alias.clone().unwrap())?;
if let Some(alias) = alias {
if table_scan.projection.is_none() && table_scan.filters.is_empty() {
builder = builder.alias(alias.clone())?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
builder = builder.alias(alias.clone())?;
builder = builder.alias(alias)?;

I don't believe this final clone is needed, since its the last place to use it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. I missed this point. Thanks!

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonahgao jonahgao merged commit cfe05b8 into apache:main Oct 23, 2024
@goldmedal goldmedal deleted the chore/13006-fix-review branch October 23, 2024 06:26
@goldmedal
Copy link
Contributor Author

Thanks @alamb @phillipleblanc @jonahgao 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sql SQL Planner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants