feat(cli): add opt-in Spark function registration - #24179
Open
goutamadwant wants to merge 2 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #24179 +/- ##
=======================================
Coverage 81.05% 81.05%
=======================================
Files 1106 1106
Lines 382210 382210
Branches 382210 382210
=======================================
+ Hits 309812 309816 +4
+ Misses 54091 54083 -8
- Partials 18307 18311 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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?
Rationale for this change
datafusion-clidoes not currently register thedatafusion-sparkfunction library, so Spark-compatible functions cannot be explored interactively. Registering them by default would silently override core DataFusion functions with the same names and could change existing CLI behavior.What changes are included in this PR?
--sparkCLI flag.Are these changes tested?
Yes. The following checks pass:
cargo test -p datafusion-cli --test cli_integration spark_functions_require_opt_incargo test -p datafusion-cli --all-targetscargo fmt --all -- --checkcargo clippy --all-targets --all-features -- -D warnings./ci/scripts/doc_prettier_check.sh./ci/scripts/license_header.sh./ci/scripts/typos_check.sh./ci/scripts/rust_docs.shAre there any user-facing changes?
Yes. Users can pass
--sparkto enable Spark-compatible functions for the CLI session. The option is disabled by default, so existing CLI behavior is unchanged. When enabled, Spark-compatible functions override DataFusion functions with the same name.