You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "osawyerr (via GitHub)" <gi...@apache.org> on 2023/06/01 21:50:22 UTC

[GitHub] [arrow-datafusion] osawyerr commented on issue #6508: octet_length(char) doesn't behave as expected.

osawyerr commented on issue #6508:
URL: https://github.com/apache/arrow-datafusion/issues/6508#issuecomment-1572835492

   @alamb There is also a related point RE how ``char``s are handles in joins and equality in postgres vs. ``varchar``as well. In postgres if I recall, the trailing spaces are ignored when comparing ``char``s but are taken into account when comparing ``varchar``s. 
   
   From your explanation, DataFusion will always take into account the trailing spaces if a "``char``" is used in a join / equality. i.e. it will behave like a postgres ``varchar``.
   
   i.e. 
   ```sql
   -- note the trailing spaces below
   select * from example where name::char(25) = 'foo    '::char(25) 
   ```
   
   Will return no results in DataFusion but in postgres the result will be returned.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org