Hi,

We are facing an issue where we are trying to replace a particular pattern
to "Esc" character by using the REGEXP_REPLACE function.

We see that in the output we get only "e" and not the "Esc" character.

Steps to reproduce:

1. Create a test table

    CREATE TABLE TEST (ID INTEGER PRIMARY KEY, DATA VARCHAR);


2. Upsert sample data

    UPSERT INTO TEST VALUES (1, '#@@##!@@#SANJAY');


3. Replace a character sequence with "Esc" (\e)

 SELECT REGEXP_REPLACE(DATA, '#!@@#', '\e') FROM TEST;


4. Result :

 +--------------------------------------+

| REGEXP_REPLACE(DATA, '#!@@#', '\e')  |

+--------------------------------------+

| #@@#eSANJAY                          |

+--------------------------------------+



We are using Phoenix on Amazon EMR. EMR version is 4.7.2. And Phoenix
version that EMR runs is 4.7.0



Best Regards,
Sangeeta Soman

Reply via email to