Skip to content

Conversation

@alamb
Copy link
Contributor

@alamb alamb commented Jul 24, 2024

Which issue does this PR close?

N/A

Rationale for this change

While working on #11630 I noticed some cloning in SQL planning that could be avoided

What changes are included in this PR?

Stop cloning oby_expr

Are these changes tested?

Existing CI

Are there any user-facing changes?

No, this is internal only

))
}
e => self.sql_expr_to_logical_expr(
e.clone(),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here is the clone that is avoided.

pub(crate) fn order_by_to_sort_expr(
&self,
exprs: &[OrderByExpr],
exprs: Vec<OrderByExpr>,
Copy link
Contributor Author

@alamb alamb Jul 24, 2024

Choose a reason for hiding this comment

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

The internal API changes to take the owned Vec rather than a slice

@alamb alamb marked this pull request as ready for review July 24, 2024 16:31
@alamb alamb merged commit bcf715c into apache:main Jul 24, 2024
@alamb
Copy link
Contributor Author

alamb commented Jul 24, 2024

Thanks @Dandandan

@alamb alamb deleted the alamb/less_clone branch July 24, 2024 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants