capkurmagati commented on a change in pull request #1249:
URL: https://github.com/apache/arrow-datafusion/pull/1249#discussion_r744773362



##########
File path: datafusion/src/physical_plan/functions.rs
##########
@@ -3859,28 +3861,56 @@ mod tests {
     }
 
     #[test]
-    fn test_concat_error() -> Result<()> {
+    fn test_empty_arguments_error() -> Result<()> {
         let ctx_state = ExecutionContextState::new();
         let schema = Schema::new(vec![Field::new("a", DataType::Int32, 
false)]);
 
-        let expr = create_physical_expr(
-            &BuiltinScalarFunction::Concat,
-            &[],
-            &schema,
-            &ctx_state,
-        )?;
+        let funs = [
+            BuiltinScalarFunction::Concat,
+            BuiltinScalarFunction::ToTimestamp,
+            BuiltinScalarFunction::Abs,
+            BuiltinScalarFunction::Repeat,
+        ];
+
+        for fun in funs.iter() {
+            let expr = create_physical_expr(fun, &[], &schema, &ctx_state);
+
+            match expr {

Review comment:
       Good to know! Thank you! Cleaned up the code.

##########
File path: datafusion/src/physical_plan/functions.rs
##########
@@ -3859,28 +3861,56 @@ mod tests {
     }
 
     #[test]
-    fn test_concat_error() -> Result<()> {
+    fn test_empty_arguments_error() -> Result<()> {
         let ctx_state = ExecutionContextState::new();
         let schema = Schema::new(vec![Field::new("a", DataType::Int32, 
false)]);
 
-        let expr = create_physical_expr(
-            &BuiltinScalarFunction::Concat,
-            &[],
-            &schema,
-            &ctx_state,
-        )?;
+        let funs = [
+            BuiltinScalarFunction::Concat,
+            BuiltinScalarFunction::ToTimestamp,
+            BuiltinScalarFunction::Abs,
+            BuiltinScalarFunction::Repeat,
+        ];

Review comment:
       Thanks for the suggestion. Added the comment. (just copied your 
suggestions :)




-- 
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.

To unsubscribe, e-mail: [email protected]

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


Reply via email to