sam-1112 commented on code in PR #5215:
URL: https://github.com/apache/datafusion-comet/pull/5215#discussion_r3964423120


##########
native/spark-expr/src/predicate_funcs/rlike.rs:
##########
@@ -225,4 +245,122 @@ mod tests {
         let result = 
expr.evaluate(&RecordBatch::new_empty(Arc::new(Schema::empty())));
         assert!(result.is_err());
     }
+
+    #[test]
+    fn test_rlike_string_array_layouts() {
+        let pattern = "R[a-z]+";
+        let cases: Vec<(DataType, ArrayRef)> = vec![
+            (
+                DataType::Utf8,
+                Arc::new(StringArray::from(vec![Some("Rose"), None, 
Some("Daisy")])),
+            ),
+            (
+                DataType::LargeUtf8,
+                Arc::new(LargeStringArray::from(vec![
+                    Some("Rose"),
+                    None,
+                    Some("Daisy"),
+                ])),
+            ),
+            (
+                DataType::Utf8View,
+                Arc::new(StringViewArray::from(vec![
+                    Some("Rose"),
+                    None,
+                    Some("Daisy"),
+                ])),
+            ),

Review Comment:
   Updated both the direct and dictionary Utf8View cases to use "Rhododendrons" 
(13 bytes), so they exercise the out-of-line view representation rather than 
the inline representation used for values of 12 bytes or fewer.



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