Details
-
Task
-
Status: Resolved
-
Resolution: Fixed
-
None
-
None
-
None
-
480
Description
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.