devanshu0987 commented on PR #19630:
URL: https://github.com/apache/datafusion/pull/19630#issuecomment-3707670355

   - I ran the following script on Postgres 18. 
   - I copied the data that we have in SLT tests and ran the same queries that 
are run inside tests.
   - We can notice that the result is the same as our SLT output updates.
   - The logic change is that the earlier tests `from` value was `foo` which 
contained duplicates and was mapping o -> r instead of Postgres compatible o -> 
a
   
   ```
   CREATE TABLE test_source (
     ascii_1 TEXT,
     ascii_2 TEXT,
     unicode_1 TEXT,
     unicode_2 TEXT
   );
   select * from test_source;
   INSERT INTO test_source values ('Andrew', 'X', 'datafusion📊🔥', '🔥');
   INSERT INTO test_source values ('Xiangpeng', 'Xiangpeng', 'datafusion数据融合', 
'datafusion数据融合');
   INSERT INTO test_source values ('Raphael', 'R', 'datafusionДатаФусион', 
'аФус');
   INSERT INTO test_source values ('under_score', 'un_____core', 'un iść core', 
'chrząszcz na łące w 東京都');
   INSERT INTO test_source values ('percent', 'p%t', 'pan Tadeusz ma iść w 
kąt', 'Pan Tadeusz ma frunąć stąd w kąt');
   INSERT INTO test_source values ('', '%', '', '');
   INSERT INTO test_source values ('', '%%', '', '');
   INSERT INTO test_source values ('%', '\%', '', '');
   INSERT INTO test_source values ('_', '\_', '', '');
   INSERT INTO test_source values (NULL, '%', NULL, NULL);
   INSERT INTO test_source values (NULL, 'R', NULL, '🔥');
   
   SELECT
     TRANSLATE(ascii_1, 'foo', 'bar') as c
   FROM test_source;
   
   c          |
   -----------+
   Andrew     |
   Xiangpeng  |
   Raphael    |
   under_scare| ---> under_sc[o]re changed to under_sc[a]re
   percent    |
              |
              |
   %          |
   _          |
              |
              |
   
   SELECT
     TRANSLATE(unicode_1, 'foo', 'bar') as c
   FROM test_source;
   
   c                       |
   ------------------------+
   databusian📊🔥          | ---> datafusi[o]n changed to databusi[a]n and 
everything else remains same
   databusian数据融合          |
   databusianДатаФусион    |
   un iść care             | ---> un_____core where c[o]re changed to c[a]re
   pan Tadeusz ma iść w kąt|
                           |
                           |
                           |
                           |
                           |
                           |
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to