-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat: Add ConfigOptions to ScalarFunctionArgs #13527
Draft
Omega359
wants to merge
16
commits into
apache:main
Choose a base branch
from
Omega359:feature/scalar_func_args_session_config
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 3 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
a18c82f
Fix md5 return_type to only return Utf8 as per current code impl.
Omega359 ad50ae6
Merge remote-tracking branch 'origin/main'
Omega359 42cd8dc
Add SessionConfig reference to ScalarFunctionArgs
Omega359 e84ca6d
Merge remote-tracking branch 'origin/main' into feature/scalar_func_a…
Omega359 1e87f7e
Merge remote-tracking branch 'origin/main'
Omega359 cc1f540
Merge remote-tracking branch 'origin/main'
Omega359 a733c8f
Merge remote-tracking branch 'origin/main'
Omega359 87b388e
Merge remote-tracking branch 'origin/main'
Omega359 6a6d86c
Merge branch 'refs/heads/main' into feature/scalar_func_args_session_…
Omega359 b8bf209
Refactored to use &ConfigOptions everywhere except for ScalarFunction…
Omega359 dc9f5db
Cleanup updates.
Omega359 1041525
Merge remote-tracking branch 'upstream/main' into feature/scalar_func…
Omega359 5557f64
Fixed merge conflict
Omega359 ead36a6
Merge remote-tracking branch 'upstream/main' into feature/scalar_func…
Omega359 794d593
Merge remote-tracking branch 'origin/main' into feature/scalar_func_a…
Omega359 6fb13d2
Updates for latest upstream changes.
Omega359 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
This file contains 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 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 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 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 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 |
---|---|---|
|
@@ -39,6 +39,7 @@ use futures::stream::FuturesUnordered; | |
use futures::{stream::BoxStream, StreamExt, TryStreamExt}; | ||
use log::{debug, trace}; | ||
|
||
use datafusion_common::config::ConfigOptions; | ||
use datafusion_common::tree_node::{TreeNode, TreeNodeRecursion}; | ||
use datafusion_common::{Column, DFSchema, DataFusionError}; | ||
use datafusion_expr::{Expr, Volatility}; | ||
|
@@ -283,10 +284,16 @@ async fn prune_partitions( | |
|
||
// TODO: Plumb this down | ||
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. This todo may have now be complete |
||
let props = ExecutionProps::new(); | ||
let config_options = Arc::new(ConfigOptions::default()); | ||
|
||
// Applies `filter` to `batch` returning `None` on error | ||
let do_filter = |filter| -> Result<ArrayRef> { | ||
let expr = create_physical_expr(filter, &df_schema, &props)?; | ||
let expr = create_physical_expr( | ||
filter, | ||
&df_schema, | ||
&props, | ||
Arc::clone(&config_options), | ||
)?; | ||
expr.evaluate(&batch)?.into_array(partitions.len()) | ||
}; | ||
|
||
|
This file contains 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 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 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 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 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.
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.
It seems somewhat inevitable that creating a physical expr will require the config options
However, I also think threading through the config options down through to the physical creation will (finally) permit people to pass things from the session down to function implementations (I think @cisaacson also was trying to do this in the past)