arrow-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sutou Kouhei <...@clear-code.com>
Subject Re: [C-Glib] - writing an extension array
Date Fri, 27 Nov 2020 03:11:46 GMT
Hi,

Could you provide the Python script you used and the C
program you used?


Thanks,
--
kou

In 
 <CS1PR8401MB082208B574A83AFF774F617CEBF90@CS1PR8401MB0822.NAMPRD84.PROD.OUTLOOK.COM>
  "[C-Glib] - writing an extension array" on Thu, 26 Nov 2020 18:11:53 +0000,
  Ishan Anand <anand.ishan@outlook.com> wrote:

> Hi
> 
> How do you go about implementing an extension type through the C API for Arrow?
> 
> Creating a record batch in python like the example in pyarrow tests [here](https://github.com/apache/arrow/blob/2a5f92455ec4f9788ee96fa209b38d76bd927196/python/pyarrow/tests/test_extension_type.py#L375),
and reading the resulting schema using the C API, it correctly reads it as an array of the
underlying storage type. The schema along with the metadata can be printed as expected.
> ```
> ext: int64
> -- metadata --
> ARROW:extension:metadata: freq=D
> ARROW:extension:name: test.period
> ```
> 
> However, trying to access the metadata for the schema (obtained with `garrow_schema_get_metadata`)
indicates its size to be 0, which indicates that metadata for the schema isn't the same as
that for a field. Is it possible using the existing API to read/write the metadata for a field?
> 
> 
> Thank you,
> Ishan

Mime
View raw message