You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "wjones127 (via GitHub)" <gi...@apache.org> on 2023/07/12 16:53:47 UTC

[GitHub] [arrow] wjones127 opened a new issue, #36648: [C++] Provide way for extension array to provide it's own value pretty printer

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

   ### Describe the enhancement requested
   
   We are looking at implementing BFloat16 data type as an extension type based on a FSB[2] storage type. In Python we can write the repr method for the array, but ChunkedArray and Table will print the storage type, which looks like nonsense to users:
   
   ```python
   >>> tab = pa.table({ "x": bfloat16_array([1.1, None, 3.4]) })
   >>> tab
   pyarrow.Table
   x: extension<lance.bfloat16<BFloat16Type>>
   ----
   x: [[8D3F,null,5A40]]
   >>> tab['x']
   <pyarrow.lib.ChunkedArray object at 0x12a1f3a60>
   [
     [
       8D3F,
       null,
       5A40
     ]
   ]
   >>> tab['x'].chunk(0)
   <lance.arrow.BFloat16Array object at 0x0000000129818a60>
   [1.1015625, None, 3.40625]
   ```
   
   https://github.com/lancedb/lance/pull/1002
   
   ### Component(s)
   
   C++


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

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