alamb commented on a change in pull request #9139:
URL: https://github.com/apache/arrow/pull/9139#discussion_r554557321



##########
File path: rust/datafusion/src/physical_plan/functions.rs
##########
@@ -392,23 +498,18 @@ fn signature(fun: &BuiltinScalarFunction) -> Signature {
 
     // for now, the list is small, as we do not have many built-in functions.
     match fun {
-        BuiltinScalarFunction::Length => {
-            Signature::Uniform(1, vec![DataType::Utf8, DataType::LargeUtf8])
-        }
         BuiltinScalarFunction::Concat => 
Signature::Variadic(vec![DataType::Utf8]),
-        BuiltinScalarFunction::Lower => {
-            Signature::Uniform(1, vec![DataType::Utf8, DataType::LargeUtf8])
-        }
-        BuiltinScalarFunction::Upper => {
-            Signature::Uniform(1, vec![DataType::Utf8, DataType::LargeUtf8])
-        }
-        BuiltinScalarFunction::Trim => {
-            Signature::Uniform(1, vec![DataType::Utf8, DataType::LargeUtf8])
-        }
-        BuiltinScalarFunction::Ltrim => {
-            Signature::Uniform(1, vec![DataType::Utf8, DataType::LargeUtf8])
-        }
-        BuiltinScalarFunction::Rtrim => {
+        BuiltinScalarFunction::Upper

Review comment:
       👍  nice cleanup

##########
File path: rust/datafusion/Cargo.toml
##########
@@ -61,6 +61,8 @@ futures = "0.3"
 pin-project-lite= "^0.2.0"
 tokio = { version = "0.2", features = ["macros", "blocking", "rt-core", 
"rt-threaded", "sync"] }
 log = "^0.4"
+md-5 = "^0.9.1"

Review comment:
       It seems to me like we might want to start offering a way to keep the 
number of required dependencies of DataFusion down. For example, in this case 
we could potentially put the use of crypto functions behind a feature flag. 
   
   I am not proposing to add the feature flag as part of this PR, but more like 
trying to set the general direction of allowing users to pick features that 
they need and not have to pay compilation time (or binary size) cost for those 
they don't
   
   What do you think @jorgecarleitao  and @andygrove 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to