-
Notifications
You must be signed in to change notification settings - Fork 282
deps: [iceberg] upgrade DataFusion to 51, Arrow to 57, Iceberg to latest, MSRV to 1.88 #2729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
6a8a3a4
Bump DF to latest main commit to test 51.0.0, bump Arrow-rs, cargo up…
mbutrovich 268e31b
Fix "sql" feature dependency for native tests.
mbutrovich 57da62d
Fix float normalize_nan bug?
mbutrovich eb95400
Remove unused imports.
mbutrovich 5399550
Switch to branch-51, run cargo update.
mbutrovich c1d8a06
Bump df51.
mbutrovich d63f5cf
Merge branch 'main' into df51
mbutrovich ed0c8df
Merge branch 'main' into df51
mbutrovich 69bd15d
Move to crate of df51.
mbutrovich 736ffa9
Merge branch 'main' into df51
mbutrovich 8e10de0
fix prost
mbutrovich eaa488d
Merge branch 'main' into df51
mbutrovich 4bcba5e
update
mbutrovich 4cbbc3d
Switch to DF51 iceberg-rust branch.
mbutrovich 4c6cbb1
Skip serializing NULL partition values.
mbutrovich dead41a
fix schema selection
mbutrovich 95bc89c
Fix format.
mbutrovich 304c169
Fix format.
mbutrovich bbc7501
switch back to main iceberg-rust now that df51 is in there
mbutrovich 05dc2bb
cargo update
mbutrovich b8576c1
Fix decimal128 partition values.
mbutrovich 1b45c81
Merge branch 'main' into df51
mbutrovich cabd0c1
go back to iceberg-rust main branch
mbutrovich 9e0bedb
Forgot to run cargo update.
mbutrovich d6b493a
test null identity-partitioned fix
mbutrovich 961957f
back to main iceberg-rust
mbutrovich de5ed17
Merge branch 'main' into df51
mbutrovich File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,13 +32,28 @@ use std::{any::Any, sync::Arc}; | |
|
|
||
| use crate::utils::{build_bool_state, is_valid_decimal_precision, unlikely}; | ||
| use arrow::array::ArrowNativeTypeOp; | ||
| use arrow::datatypes::{MAX_DECIMAL128_FOR_EACH_PRECISION, MIN_DECIMAL128_FOR_EACH_PRECISION}; | ||
| use arrow::datatypes::{ | ||
| DECIMAL128_MAX_PRECISION, DECIMAL128_MAX_SCALE, MAX_DECIMAL128_FOR_EACH_PRECISION, | ||
| MIN_DECIMAL128_FOR_EACH_PRECISION, | ||
| }; | ||
| use datafusion::logical_expr::function::{AccumulatorArgs, StateFieldsArgs}; | ||
| use datafusion::logical_expr::type_coercion::aggregates::avg_return_type; | ||
| use datafusion::logical_expr::Volatility::Immutable; | ||
| use num::{integer::div_ceil, Integer}; | ||
| use DataType::*; | ||
|
|
||
| fn avg_return_type(_name: &str, data_type: &DataType) -> Result<DataType> { | ||
| match data_type { | ||
| Decimal128(precision, scale) => { | ||
| // In the spark, the result type is DECIMAL(min(38,precision+4), min(38,scale+4)). | ||
| // Ref: https://github.com/apache/spark/blob/fcf636d9eb8d645c24be3db2d599aba2d7e2955a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/Average.scala#L66 | ||
| let new_precision = DECIMAL128_MAX_PRECISION.min(*precision + 4); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nice |
||
| let new_scale = DECIMAL128_MAX_SCALE.min(*scale + 4); | ||
| Ok(Decimal128(new_precision, new_scale)) | ||
| } | ||
| _ => not_impl_err!("Avg return type for {data_type}"), | ||
| } | ||
| } | ||
|
|
||
| /// AVG aggregate expression | ||
| #[derive(Debug, Clone, PartialEq, Eq, Hash)] | ||
| pub struct AvgDecimal { | ||
|
|
||
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI It was an issue with Q13 projection pushdown with this method
apache/datafusion#19094 (review)