Uh oh!
There was an error while loading. Please reload this page.
Remove expr_fn::sum and replace them with function stub - #10816
Merged
Conversation
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
jayzhan211
commented
Jun 7, 2024
| 04)------RepartitionExec: partitioning=RoundRobinBatch(4), input_partitions=1 | ||
| 05)--------CsvExec: file_groups={1 group: [[WORKSPACE_ROOT/datafusion/core/tests/data/convert_first_last.csv]]}, projection=[c1, c2], output_orderings=[[c1@0 ASC NULLS LAST], [c2@1 DESC]], has_header=true | ||
| # test building plan with aggreagte sum |
ContributorAuthor
There was a problem hiding this comment.
move the corresponding test in datafusion_expr to avoid introducing another stub
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
alamb
reviewed
Jun 7, 2024
alamb
left a comment
Contributor
There was a problem hiding this comment.
I think this looks good, fwiw
Uh oh!
There was an error while loading. Please reload this page.
| } | ||
| #[derive(Debug)] | ||
| pub struct Sum { |
Contributor
There was a problem hiding this comment.
Suggested change
| pubstructSum{ | |
| /// Stub `sum` used for optimizer testing | |
| pubstructSum{ |
alamb
commented
Jun 7, 2024
Contributor
Thank you @jayzhan211 |
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
jayzhan211
marked this pull request as ready for review
June 7, 2024 12:27
alamb
reviewed
Jun 7, 2024
alamb
left a comment
Contributor
There was a problem hiding this comment.
Thank you @jayzhan211 -- this looks great to me
I also updated this PR's description to add some additional rationale
| /// Create an expression to represent the sum() aggregate function | ||
| /// | ||
| /// TODO: Remove this function and use `sum` from `datafusion_functions_aggregate::expr_fn` instead |
jayzhan211
commented
Jun 7, 2024
ContributorAuthor
Thanks @alamb |
alamb
approved these changes
Jun 7, 2024
findepi pushed a commit
to findepi/datafusion
that referenced
this pull request
Jul 16, 2024
* introduce stub for test Signed-off-by: jayzhan211 <jayzhan211@gmail.com> * fix err msg Signed-off-by: jayzhan211 <jayzhan211@gmail.com> * dont compare error msg, ci is not consistent with local Signed-off-by: jayzhan211 <jayzhan211@gmail.com> * comment and cli update Signed-off-by: jayzhan211 <jayzhan211@gmail.com> * fmt Signed-off-by: jayzhan211 <jayzhan211@gmail.com> --------- Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Part of #10731
Inspired from #10807 (comment)
Close#10807
Rationale for this change
The reason to add a stub is that as we pull the aggregate functions out of the core and into
datafusion-functions-aggregatethe existing optimizer passes don't depend on datafusion-functions-aggregate.Thus by using stubs we'll keep the optimizer passes decoupled from the built in aggregate functions as much as possible.
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?