You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2024/07/24 14:13:51 UTC
[PR] Minor: avoid copying order by exprs in planner [datafusion]
alamb opened a new pull request, #11634:
URL: https://github.com/apache/datafusion/pull/11634
## Which issue does this PR close?
N/A
## Rationale for this change
While working on https://github.com/apache/datafusion/pull/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?
<!--
If there are user-facing changes then we may require documentation to be updated before approving the PR.
-->
<!--
If there are any breaking changes to public APIs, please add the `api change` label.
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Minor: avoid copying order by exprs in planner [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb merged PR #11634:
URL: https://github.com/apache/datafusion/pull/11634
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Minor: avoid copying order by exprs in planner [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #11634:
URL: https://github.com/apache/datafusion/pull/11634#issuecomment-2248741451
Thanks @Dandandan
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Minor: avoid copying order by exprs in planner [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #11634:
URL: https://github.com/apache/datafusion/pull/11634#discussion_r1689903291
##########
datafusion/sql/src/expr/order_by.rs:
##########
@@ -87,11 +87,9 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
input_schema.qualified_field(field_index - 1),
))
}
- e => self.sql_expr_to_logical_expr(
- e.clone(),
Review Comment:
Here is the clone that is avoided.
##########
datafusion/sql/src/expr/order_by.rs:
##########
@@ -37,7 +37,7 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
/// If false, interpret numeric literals as constant values.
pub(crate) fn order_by_to_sort_expr(
&self,
- exprs: &[OrderByExpr],
+ exprs: Vec<OrderByExpr>,
Review Comment:
the API changes to take the owned `Vec` rather than a slice
##########
datafusion/sql/src/expr/order_by.rs:
##########
@@ -37,7 +37,7 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
/// If false, interpret numeric literals as constant values.
pub(crate) fn order_by_to_sort_expr(
&self,
- exprs: &[OrderByExpr],
+ exprs: Vec<OrderByExpr>,
Review Comment:
The internal API changes to take the owned `Vec` rather than a slice
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org