You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Gabriel Reid (JIRA)" <ji...@apache.org> on 2014/03/16 08:23:12 UTC
[jira] [Resolved] (PHOENIX-611) regexp_substr(), is displaying
wrong results, if starting and end character is same and vice versa also.
[ https://issues.apache.org/jira/browse/PHOENIX-611?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gabriel Reid resolved PHOENIX-611.
----------------------------------
Resolution: Fixed
Bulk resolve of closed issues imported from GitHub. This status was reached by first re-opening all closed imported issues and then resolving them in bulk.
> regexp_substr(), is displaying wrong results, if starting and end character is same and vice versa also.
> --------------------------------------------------------------------------------------------------------
>
> Key: PHOENIX-611
> URL: https://issues.apache.org/jira/browse/PHOENIX-611
> Project: Phoenix
> Issue Type: Task
> Reporter: Y. SREENIVASULU REDDY
> Labels: invalid
>
> 1. create a table and insert some amount of data into the table.
> 2. query to test regexp_substr(). in below manner.
> but expected result is not displaying.
> 0: jdbc:phoenix:10.18.40.69,10.18.40.130> select *,regexp_substr(name,'[^s]+',1) from sqltable limit 5;
> +------+------------+------------+------+-------------------------------+
> | NO | NAME | ADDR | DEPT | REGEXP_SUBSTR(NAME,'[^s]+',1) |
> +------+------------+------------+------+-------------------------------+
> | 0 | jruls | HYD | 30 | jrul |
> | 1 | hrjcu | MUM | 30 | hrjcu |
> | 2 | yqtrv | BLR | 30 | yqtrv |
> | 3 | satax | HYD | 30 | atax |
> | 4 | jjcvw | BLR | 40 | jjcvw |
> +------+------------+------------+------+-------------------------------+
> here for record 3 expected the value is null. but it is displaying "atax"
> similarly in reverse order
> 0: jdbc:phoenix:10.18.40.69,10.18.40.130> select *,regexp_substr(name,'[^s]+',-1) from sqltable limit 5;
> +------+------------+------------+------+-----------------------------------------------------------------------------------+
> | NO | NAME | ADDR | DEPT | REGEXP_SUBSTR(NAME,'[^s]+',com.salesforce.phoenix.parse.MultiplyParseNode[1, -1]) |
> +------+------------+------------+------+-----------------------------------------------------------------------------------+
> | 0 | jruls | HYD | 30 | null |
> | 1 | hrjcu | MUM | 30 | u |
> | 2 | yqtrv | BLR | 30 | v |
> | 3 | satax | HYD | 30 | x |
> | 4 | jjcvw | BLR | 40 | w |
> +------+------------+------------+------+-----------------------------------------------------------------------------------+
> here in reverse order value for 3.
--
This message was sent by Atlassian JIRA
(v6.2#6252)