milenkovicm commented on issue #8051:
URL: https://github.com/apache/datafusion/issues/8051#issuecomment-2348170059

   It looks somebody needs to prototype what @alamb suggested in 
   
   https://github.com/apache/datafusion/issues/8051#issuecomment-1979747257 
   
   I believe there is small change, some args will be used to create pattern so 
they should be removed from passing them down to result expression
   
   ```rust
   match (args[1], args[2]) {
        (ScalarValue::Utf8(pattern), ScalarValue::Utf8(flags)) => {
          let pattern = // create regexp match, probably from  args[1], and 
arg[2]
          let new_args = vec![args[0]]
          SImplified::Rewritten(ScalarUdf::new(PrecompiledRegexpMatch { 
precompiled } )))
           .call(new_args)
   },
   ```
   
   The only downside I see is that the "state" is not going to be serialised if 
it has to be distributed in systems like ballista. It would make sense to have 
generic "serialise to physical plan" at some point,  it would help with 
distributing something like python udfs but, thats probably different 
discussion. 
   
   also note: https://github.com/apache/datafusion/pull/12270 


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