-
Notifications
You must be signed in to change notification settings - Fork 255
chore: migrate to DF 49.0.0 #2040
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 9 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
1e017bc
chore: migrate to DF 49.0.0
comphead f0c6279
chore: migrate to DF 49.0.0
comphead 91e3ecd
chore: migrate to DF 49.0.0
comphead 9be0a65
chore: migrate to DF 49.0.0
comphead 1d48396
fixes
comphead 85bdc26
fixes
comphead 951ef01
fixes
comphead f008ff3
fixes
comphead 99d17ab
fixes
comphead 3953361
chore: migrate to DF 49.0.0
comphead d5f723d
chore: migrate to DF 49.0.0
comphead 660c8ba
chore: migrate to DF 49.0.0
comphead 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -72,7 +72,7 @@ use crate::parquet::parquet_support::prepare_object_store_with_configs; | |
| use datafusion::common::scalar::ScalarStructBuilder; | ||
| use datafusion::common::{ | ||
| tree_node::{Transformed, TransformedResult, TreeNode, TreeNodeRecursion, TreeNodeRewriter}, | ||
| JoinType as DFJoinType, ScalarValue, | ||
| JoinType as DFJoinType, NullEquality, ScalarValue, | ||
| }; | ||
| use datafusion::datasource::listing::PartitionedFile; | ||
| use datafusion::logical_expr::type_coercion::other::get_coerce_type_for_case_expression; | ||
|
|
@@ -594,6 +594,14 @@ impl PhysicalPlanner { | |
| true, | ||
| false, | ||
| ))), | ||
| // DataFusion 49 hardcodes return type for MD5 built in function as UTF8View | ||
| // which is not yet supported in Comet | ||
| // Converting forcibly to UTF8. To be removed after UTF8View supported | ||
| "md5" => Ok(Arc::new(Cast::new( | ||
| func?, | ||
| DataType::Utf8, | ||
| SparkCastOptions::new_without_timezone(EvalMode::Try, true), | ||
| ))), | ||
| _ => func, | ||
| } | ||
| } | ||
|
|
@@ -1153,7 +1161,7 @@ impl PhysicalPlanner { | |
| let child_copied = Self::wrap_in_copy_exec(Arc::clone(&child.native_plan)); | ||
|
|
||
| let sort = Arc::new( | ||
| SortExec::new(LexOrdering::new(exprs?), Arc::clone(&child_copied)) | ||
| SortExec::new(LexOrdering::new(exprs?).unwrap(), Arc::clone(&child_copied)) | ||
|
Member
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. note for other reviewers: the |
||
| .with_fetch(fetch), | ||
| ); | ||
|
|
||
|
|
@@ -1429,7 +1437,7 @@ impl PhysicalPlanner { | |
| sort_options, | ||
| // null doesn't equal to null in Spark join key. If the join key is | ||
| // `EqualNullSafe`, Spark will rewrite it during planning. | ||
| false, | ||
| NullEquality::NullEqualsNothing, | ||
| )?); | ||
|
|
||
| if join.filter.is_some() { | ||
|
|
@@ -1497,7 +1505,7 @@ impl PhysicalPlanner { | |
| PartitionMode::Partitioned, | ||
| // null doesn't equal to null in Spark join key. If the join key is | ||
| // `EqualNullSafe`, Spark will rewrite it during planning. | ||
| false, | ||
| NullEquality::NullEqualsNothing, | ||
| )?); | ||
|
|
||
| // If the hash join is build right, we need to swap the left and right | ||
|
|
@@ -2193,13 +2201,15 @@ impl PhysicalPlanner { | |
| }; | ||
|
|
||
| let window_frame = WindowFrame::new_bounds(units, lower_bound, upper_bound); | ||
| let lex_orderings = LexOrdering::new(sort_exprs.to_vec()); | ||
| let sort_phy_exprs = lex_orderings.as_deref().unwrap_or(&[]); | ||
|
|
||
| datafusion::physical_plan::windows::create_window_expr( | ||
| &window_func, | ||
| window_func_name, | ||
| &window_args, | ||
| partition_by, | ||
| &LexOrdering::new(sort_exprs.to_vec()), | ||
| sort_phy_exprs, | ||
| window_frame.into(), | ||
| input_schema.as_ref(), | ||
| false, // TODO: Ignore nulls | ||
|
|
@@ -2280,7 +2290,7 @@ impl PhysicalPlanner { | |
| .iter() | ||
| .map(|expr| self.create_sort_expr(expr, Arc::clone(&input_schema))) | ||
| .collect(); | ||
| let lex_ordering = LexOrdering::from(exprs?); | ||
| let lex_ordering = LexOrdering::new(exprs?).unwrap(); | ||
| Ok(CometPartitioning::RangePartitioning( | ||
| lex_ordering, | ||
| range_partition.num_partitions as usize, | ||
|
|
||
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
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.