From e1468402e311e353ea7a10e3f140a066a6f782ad Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Tue, 3 Mar 2026 06:31:59 -0500 Subject: [PATCH] Minor: Add comment explaining rationale to avoid dependencies on functions --- datafusion/optimizer/Cargo.toml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/datafusion/optimizer/Cargo.toml b/datafusion/optimizer/Cargo.toml index 76d3f73f68767..e3a6733532324 100644 --- a/datafusion/optimizer/Cargo.toml +++ b/datafusion/optimizer/Cargo.toml @@ -43,6 +43,14 @@ name = "datafusion_optimizer" [features] recursive_protection = ["dep:recursive"] +# Note -- please DO NOT add a dependency here to any of the datafusion-functions +# crates. While it is tempting to try and add an optimizer pass that uses +# datafusion-functions Doing so makes it harder for downstream crates to +# provide their own function library and smaller install footprint. +# +# If you want to add special handling for a specific function, use the methods +# on the ScalarUDFImpl or AggregateUDFImpl traits (or add a new method to those +# traits). [dependencies] arrow = { workspace = true } chrono = { workspace = true }