Optimize nth_value, remove first_value, last_value structs and use idiomatic rust style#452
Merged
alamb merged 2 commits intoapache:masterfrom Jun 1, 2021
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #452 +/- ##
==========================================
+ Coverage 75.30% 75.36% +0.06%
==========================================
Files 152 152
Lines 25275 25294 +19
==========================================
+ Hits 19033 19063 +30
+ Misses 6242 6231 -11
Continue to review full report at Codecov.
|
nth_value, remove first_value, last_value structs and use idiomatic rust style
Member
Author
|
@alamb as promised :-) |
alamb
approved these changes
Jun 1, 2021
| fn test_i32_result(expr: Arc<NthValue>, expected: i32) -> Result<()> { | ||
| let arr: ArrayRef = Arc::new(Int32Array::from(vec![1, -2, 3, -4, 5, -6, 7, 8])); | ||
| let schema = Schema::new(vec![Field::new("arr", DataType::Int32, false)]); | ||
| let batch = RecordBatch::try_new(Arc::new(schema), vec![arr])?; |
Contributor
There was a problem hiding this comment.
FWIW for tests like this you can also use RecordBatch::try_from_iter to avoid having to construct the Schema directly.
This way is great too, I just figured I would point it out for the future
H0TB0X420
pushed a commit
to H0TB0X420/datafusion
that referenced
this pull request
Oct 7, 2025
Bumps [arduino/setup-protoc](https://github.com/arduino/setup-protoc) from 1 to 2. - [Release notes](https://github.com/arduino/setup-protoc/releases) - [Commits](arduino/setup-protoc@v1...v2) --- updated-dependencies: - dependency-name: arduino/setup-protoc dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
H0TB0X420
pushed a commit
to H0TB0X420/datafusion
that referenced
this pull request
Oct 7, 2025
…" (apache#474) This reverts commit 944b1c9.
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.
Which issue does this PR close?
Closes #448 .
Rationale for this change
we can:
What changes are included in this PR?
Are there any user-facing changes?