In the future, it would be helpful if you start by asking usage questions
on the user list. I think that will get you faster answers and improve bug
reports.

Drill currently uses Java's regex.  It would be great if you could provide
a documentation pull request to correct the function documentation.

For those wanting to better understand the Drill codebase in the future.
If you have a question about function implementations, Drill uses the same
function implementation for internal functions as UDFs.  As such, you can
easily search the Drill codebase in many situations and better understand
exactly how a particular function is implemented.  For example:

Search for "regexp_replace" on GitHub
https://github.com/apache/drill/search?utf8=%E2%9C%93&q=regexp_replace

Look at the function implementation for the regexp_replace function to
determine its behavior.  This is where we use Java's regex library:
https://github.com/apache/drill/blob/master/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/StringFunctions.java#L193

On Sun, Aug 23, 2015 at 5:19 PM, Daniel Barclay (Drill) (JIRA) <
[email protected]> wrote:

> Daniel Barclay (Drill) created DRILL-3697:
> ---------------------------------------------
>
>              Summary: REGEXP_REPLACE doc. says POSIX reg. expr.; which?
> not Java?
>                  Key: DRILL-3697
>                  URL: https://issues.apache.org/jira/browse/DRILL-3697
>              Project: Apache Drill
>           Issue Type: Bug
>             Reporter: Daniel Barclay (Drill)
>
>
> The {{REGEXP_REPLACE}} function documentation currently at [
> https://drill.apache.org/docs/string-manipulation/#regexp_replace] says
> that {{REGEXP_REPLACE}} uses POSIX regular expressions.
>
> Is that true (that Drill using POSIX regular expressions and not Java
> regular expressions)?
>
> If that's really true, are they BREs or EREs?
>
> Assuming it's actually Java regular expressions, the documentation should
> probably have a link to some appropriate target in the JDK Java doc (maybe
> http://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html and
> http://docs.oracle.com/javase/8/docs/api/java/util/regex/Matcher.html#replaceAll-java.lang.String-
> .
>
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v6.3.4#6332)
>

Reply via email to