davlee1972 opened a new issue, #43312:
URL: https://github.com/apache/arrow/issues/43312

   ### Describe the enhancement requested
   
   I'm trying to define a schema in a yaml config file using pyarrow aliases, 
but in one use case I have a binary column for the schema.
   
   I tried using "fixed_size_binary[8]" for an alias and it is missing..
   
   Here's a working example for date32..
   
   ```
   >>> b = pa.date32()
   >>> str(b)
   'date32[day]'
   >>> pa.type_for_alias("date32[day]")
   DataType(date32[day])
   
   ```
   
   Here's is the non-working example for binary.
   ```
   >>> a = pa.binary(8)
   >>> str(a)
   'fixed_size_binary[8]'
   >>> pa.type_for_alias("fixed_size_binary[8]")
   Traceback (most recent call last):
     File "pyarrow\\types.pxi", line 5266, in pyarrow.lib.type_for_alias
   KeyError: 'fixed_size_binary[8]'
   During handling of the above exception, another exception occurred:
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
     File "pyarrow\\types.pxi", line 5268, in pyarrow.lib.type_for_alias
   ValueError: No type alias for fixed_size_binary[8]
   ```
   
   Variable length binary does work..
   ```
   >>> c = pa.binary()
   >>> str(c)
   'binary'
   >>> pa.type_for_alias("binary")
   DataType(binary)
   ```
   
   ### Component(s)
   
   Python


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