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

   ### Is your feature request related to a problem or challenge?
   
   I would like to be able to cast HEX value to a FixedSizeBinary. For example 
PostgreSQL interprets value as hex using such syntax `E'\\xDEADBEEF'::bytea` 
and converts it to binary type.
   
   I have seen that there is some support for interpreting text as bytes but 
afaik there is no way to hint it that the payload is a hex value.
   ```
   ❯ select arrow_cast('002920a3044b3c9f56e797b8'::bytea, 
'FixedSizeBinary(12)');
   Error during planning: byte slice doesn't match fixed size binary value 
length ( err looks something like that )
   ```
   
   ### Describe the solution you'd like
   
   Any kind of variation that would allow me to specify hex value then parse it 
as fixed size binary.
   
   For example
   ```
   ❯ select arrow_cast(E'\\xDEADBEEF'::bytea, 'FixedSizeBinary(4)');
   ```
   
   Then I would like to be able to query over fixed size binary type.
   ```
   select * 
   from table 
   where 
       header = arrow_cast(E'\\xDEADBEEF'::bytea, 'FixedSizeBinary(4)');
   ```
   
   ### 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