Repository navigation
Minor Code cleanups - #1428
Merged
Merged
Minor Code cleanups#1428
Conversation
alamb
marked this pull request as ready for review
December 9, 2021 17:51
alamb
commented
Dec 9, 2021
| missing_cols: &[Column], | ||
| ) -> Result<LogicalPlan> { | ||
| match curr_plan.clone() { | ||
| match curr_plan { |
Contributor
Author
There was a problem hiding this comment.
no need to clone -- we already take cur_plan by value
| new_expr.extend(expr); | ||
| missing_cols.iter().try_for_each::<_, Result<()>>(|c| { | ||
| new_expr.push(normalize_col(Expr::Column(c.clone()), &input)?); | ||
| let missing_exprs = missing_cols |
Contributor
Author
There was a problem hiding this comment.
this just rejiggers stuff to avoid the need for mut -- not critical but I think it is more concise
|
|
||
| Ok(()) | ||
| })?; | ||
| let new_inputs = curr_plan |
Contributor
Author
There was a problem hiding this comment.
same thing here -- just avoids the need for mut (and I think it is clearer what is going on now too)
xudong963
approved these changes
Dec 9, 2021
viirya
approved these changes
Dec 9, 2021
Member
|
Thanks @alamb ! |
unkloud
pushed a commit
to unkloud/datafusion
that referenced
this pull request
Mar 23, 2025
## Which issue does this PR close? Closes apache#1422. ## Rationale for this change Support IntegralDivide function ## What changes are included in this PR? Since datafusion div operator conforms to the logic of intergal div, we only need to convert `IntegralDivide(...)` to `Cast(Divide(...), LongType)` and then convert it to native. ## How are these changes tested? added unit test
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 free
to 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.
This PR contains some minor style cleanups that I noticed while reviewing #1415 from @viirya.
As that PR had already had a lot of discussion, I figured I would just propose the cleanups directly as a follow on PR rather than hold up merging #1415