epsio-banay commented on code in PR #6601:
URL: https://github.com/apache/arrow-datafusion/pull/6601#discussion_r1225772235


##########
datafusion/sql/tests/integration_test.rs:
##########
@@ -125,12 +127,78 @@ fn parse_ident_normalization() {
             ParserOptions {
                 parse_float_as_decimal: false,
                 enable_ident_normalization,
+                prioritize_udf: false,
             },
         );
         assert_eq!(expected, format!("{plan:?}"));
     }
 }
 
+#[test]
+fn parse_prioritize_udf() {
+    // Create a UDF that has the same name as a builtin function (abs)
+    let return_type: ReturnTypeFunction =
+        Arc::new(move |_| Ok(Arc::new(DataType::Int64)));
+    let fun: ScalarFunctionImplementation =
+        Arc::new(move |_| 
Ok(ColumnarValue::Scalar(ScalarValue::Int64(Some(1)))));
+    let scalar_udf = Arc::new(ScalarUDF::new(
+        "abs",
+        &Signature::uniform(1, vec![DataType::Float32], Volatility::Stable),
+        &return_type,
+        &fun,
+    ));
+
+    // Test data
+    let test_data = [

Review Comment:
   Done in scalar_udf_override_built_in_scalar_function



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