Omega359 commented on code in PR #15928: URL: https://github.com/apache/datafusion/pull/15928#discussion_r2178421432
########## datafusion/functions/src/regex/mod.rs: ########## @@ -60,6 +65,34 @@ pub mod expr_fn { super::regexp_match().call(args) } + /// Returns index of regular expression matches in a string. + pub fn regexp_instr( + values: Expr, + regex: Expr, + start: Option<Expr>, + n: Option<Expr>, + endoption: Option<Expr>, + flags: Option<Expr>, + subexpr: Option<Expr>, + ) -> Expr { + let mut args = vec![values, regex]; + if let Some(start) = start { + args.push(start); + }; + if let Some(n) = n { + args.push(n); + }; + if let Some(endoption) = endoption { + args.push(endoption); + }; + if let Some(flags) = flags { + args.push(flags); + }; + if let Some(subexpr) = subexpr { + args.push(subexpr); + }; + super::regexp_instr().call(args) + } /// Returns true if a has at least one match in a string, false otherwise. Review Comment: ```suggestion /// Returns true if a regex has at least one match in a string, false otherwise. ``` -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org