kazantsev-maksim commented on code in PR #5322:
URL: https://github.com/apache/datafusion-comet/pull/5322#discussion_r3819780871


##########
native/spark-expr/src/string_funcs/contains.rs:
##########
@@ -134,6 +138,21 @@ fn contains_with_arrow_scalar(
     Ok(Arc::new(result))
 }
 
+fn contains_scalar_array(
+    haystack_scalar: &ScalarValue,
+    needle_array: &ArrayRef,
+) -> Result<ArrayRef> {
+    if haystack_scalar.is_null() {
+        return Ok(Arc::new(BooleanArray::new_null(needle_array.len())));
+    }
+
+    let haystack_str = get_string_scalar_value(haystack_scalar, "haystack")?;
+    let haystack_scalar_array = StringArray::new_scalar(haystack_str);
+
+    let result = arrow_contains(&haystack_scalar_array, needle_array)?;

Review Comment:
   Thanks @sunchao! I tried addressed your coment



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to