tshauck opened a new issue, #9487:
URL: https://github.com/apache/arrow-datafusion/issues/9487

   ### Is your feature request related to a problem or challenge?
   
   I'm not sure if this is a bug or not, but generally, the `trim` function 
does not behave as I'd expect (or the same way postgres/duckdb handle it)...
   
   E.g. in postgres:
   
   ```
   SELECT trim('test.com', '.com');
   btrim 
   -------
    test
   ```
   
   I.e. it seems to be using btrim and removing the second argument.
   
   This behavior is the same in duckdb:
   
   ```
   SELECT TRIM('test.com', '.com');
   test
   ```
   
   In datafusion, the following happens:
   
   ```
   ❯ SELECT TRIM('test.com', '.com') AS t;
   +----------+
   | t        |
   +----------+
   | test.com |
   +----------+
   1 row in set. Query took 0.021 seconds.
   ```
   
   Calling `btrim` directly does work as expected...
   
   ```
   ❯ SELECT BTRIM('test.com', '.com') AS t;
   +------+
   | t    |
   +------+
   | test |
   +------+
   1 row in set. Query took 0.003 seconds.
   ```
   
   
   ### Describe the solution you'd like
   
   I'd like `trim` to work on whatever the second parameter is without using 
`btrim` directly.
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   _No response_


-- 
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]

Reply via email to