tobyhede opened a new issue #1429:
URL: https://github.com/apache/arrow-datafusion/issues/1429


   **Describe the bug**
   The regexp_match function fails to compile when supplied a `g` flag.
   
   **To Reproduce**
   At the moment many functions including regex match are not working correctly 
when accessed directly via the dataframe interface (I am working on a fix for 
this). 
   To reproduce this bug, setup a test in functions.rs
   ```
       test_function!(
               RegexpMatch,
               &[
                   lit(ScalarValue::Utf8(Some("abc".to_string()))),
                   lit(ScalarValue::Utf8(Some("a..".to_string()))),
                   lit(ScalarValue::Utf8(Some("g".to_string()))),
               ],
               Ok(Some("abc")),
               &str,
               Utf8,
               StringArray
           );
   ```
   This will fail with a compile error from the regex subsystem.
   
   **Expected behavior**
   The regex_match function should accept "g" as the standard regex global 
expression flag.
   
   **Additional context**
   the regex_match function, that does behave as expected includes some lines 
to format flags into a rust pattern:
   
https://github.com/apache/arrow-datafusion/blob/50a98805cdd6d5383f0c124d449ed549ca13428a/datafusion/src/physical_plan/regex_expressions.rs#L139
   
   This mapping is not present in the regex_match 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