Skip to content

Commit 678d1ad

Browse files
authored
Minor: Add comment explaining rationale to avoid dependencies on functions (#20667)
## Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123. --> - Closes #. ## Rationale for this change Somewhat frequently PRs try and add a dependency (both codewise and logically) to datafusion-functions in the datafusion-optimizer crate This then gets flagged during code review, which is somewhat frustrating probably for the submitter as they didn't know. This most recently happened here https://github.com/apache/datafusion/pull/20610/changes#r2877698578 Thus let's try and document that attempt in comments ## What changes are included in this PR? Add comments to the relevant Cargo.toml file ## Are these changes tested? N/A ## Are there any user-facing changes? No this is a development process change only
1 parent b3976d6 commit 678d1ad

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

datafusion/optimizer/Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ name = "datafusion_optimizer"
4343
[features]
4444
recursive_protection = ["dep:recursive"]
4545

46+
# Note -- please DO NOT add a dependency here to any of the datafusion-functions
47+
# crates. While it is tempting to try and add an optimizer pass that uses
48+
# datafusion-functions Doing so makes it harder for downstream crates to
49+
# provide their own function library and smaller install footprint.
50+
#
51+
# If you want to add special handling for a specific function, use the methods
52+
# on the ScalarUDFImpl or AggregateUDFImpl traits (or add a new method to those
53+
# traits).
4654
[dependencies]
4755
arrow = { workspace = true }
4856
chrono = { workspace = true }

0 commit comments

Comments
 (0)