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

   ### Describe the bug
   
   Hi there,
   
   ``select octet_length(char)`` doesn't behave as expected. 
   
   In the example below -  in Postgres (``text`` column) the below SQL would 
return 25 as the result however in DataFusion (``StringArray`` column ) it just 
returns the original length of the values in ``n_name``. 
   
   ```sql
   select octet_length(n_name::char(25)) from nation;
   ```
   
   I'm not sure if this is because the cast to a ``char(25)`` is not behaving 
as expected
   
   ### To Reproduce
   
   create a StringColumn in DF, populate it with some values and run the 
following SQL on it. 
   
   ```sql
   select octet_length(n_name::char(25)) from nation;
   ```
   
   ### Expected behavior
   
   Should return 25, but it returns the length of each of the values in the 
column.
   
   ### 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