drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacques Nadeau (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-572) regexp_replace function returns incorrect result
Date Sun, 10 Aug 2014 22:08:32 GMT

    [ https://issues.apache.org/jira/browse/DRILL-572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14092232#comment-14092232
] 

Jacques Nadeau commented on DRILL-572:
--------------------------------------

You must use Java character classes.

> regexp_replace function returns incorrect result
> ------------------------------------------------
>
>                 Key: DRILL-572
>                 URL: https://issues.apache.org/jira/browse/DRILL-572
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Functions - Drill
>    Affects Versions: 1.0.0
>            Reporter: Krystal
>            Assignee: Krystal
>             Fix For: 0.5.0
>
>
> Ran the following query from drill:
> select regexp_replace('408.123.4567', '([[:digit:]]{3})\.([[:digit:]]{3})\.([[:digit:]]{4})','(\1)
\2-\3') from voter where voter_id=10;
> The following result was returned:
> +------------+
> |   EXPR$0   |
> +------------+
> | 408.123.4567 |
> +------------+
> The correct answer should be:
> (408) 123-4567



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message