add integration tests for rank, dense_rank, fix last_value evaluation with rank#638
Merged
alamb merged 1 commit intoapache:masterfrom Jun 30, 2021
Merged
Conversation
091ca96 to
c6e4fd0
Compare
10e07a9 to
7049b4e
Compare
8a90c61 to
617190d
Compare
5f166a0 to
c3b12c1
Compare
jimexist
commented
Jun 29, 2021
| @@ -952,15 +952,8 @@ async fn csv_query_window_with_order_by() -> Result<()> { | |||
| let actual = execute(&mut ctx, sql).await; | |||
| let expected = vec![ | |||
Member
Author
There was a problem hiding this comment.
-[ RECORD 1 ]-----------------------
c9 | 28774375
sum | 61035129
avg | 61035129.000000000000
count | 1
max | 61035129
min | 61035129
first_value | 61035129
last_value | 61035129
nth_value | ¤
-[ RECORD 2 ]-----------------------
c9 | 63044568
sum | -47938237
avg | -23969118.500000000000
count | 2
max | 61035129
min | -108973366
first_value | 61035129
last_value | -108973366
nth_value | -108973366
-[ RECORD 3 ]-----------------------
c9 | 141047417
sum | 575165281
avg | 191721760.33333333
count | 3
max | 623103518
min | -108973366
first_value | 61035129
last_value | 623103518
nth_value | -108973366
-[ RECORD 4 ]-----------------------
c9 | 141680161
sum | -1352462829
avg | -338115707.25000000
count | 4
max | 623103518
min | -1927628110
first_value | 61035129
last_value | -1927628110
nth_value | -108973366
-[ RECORD 5 ]-----------------------
c9 | 145294611
sum | -3251637940
avg | -650327588.00000000
count | 5
max | 623103518
min | -1927628110
first_value | 61035129
last_value | -1899175111
nth_value | -108973366
c3b12c1 to
724b2bf
Compare
724b2bf to
5b68cbb
Compare
Member
Author
|
@alamb and @Dandandan this pull request is ready now |
alamb
approved these changes
Jun 29, 2021
| .iter() | ||
| .map(|range| { | ||
| let len = range.end - range.start; | ||
| let value = ScalarValue::try_from_array(arr, range.end - 1)?; |
| // because the default window frame is between unbounded preceding and current | ||
| // row, hence the shift because for values with indices < index they should be | ||
| // null. This changes when window frames other than default is implemented | ||
| shift(arr.as_ref(), index as i64).map_err(DataFusionError::ArrowError) |
andygrove
added a commit
to andygrove/datafusion
that referenced
this pull request
Jan 31, 2025
…-compatible DataFusion expressions (apache#638) * convert into workspace project * update GitHub actions * update Makefile * fix regression * update target path * update protobuf path in pom.xml * update more paths * add new datafusion-comet-expr crate * rename CometAbsFunc to Abs and add documentation * fix error message * improve error handling * update crate description * remove unused dep * address feedback * finish renaming crate * update README for datafusion-spark-expr * rename crate to datafusion-comet-spark-expr
unkloud
pushed a commit
to unkloud/datafusion
that referenced
this pull request
Mar 23, 2025
…-compatible DataFusion expressions (apache#638) * convert into workspace project * update GitHub actions * update Makefile * fix regression * update target path * update protobuf path in pom.xml * update more paths * add new datafusion-comet-expr crate * rename CometAbsFunc to Abs and add documentation * fix error message * improve error handling * update crate description * remove unused dep * address feedback * finish renaming crate * update README for datafusion-spark-expr * rename crate to datafusion-comet-spark-expr
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?
add integration tests for rank, dense_rank, fix last_value evaluation with rank
Closes follow ups on #555
Rationale for this change
What changes are included in this PR?
Are there any user-facing changes?