Hi,

Thanks.

We need to implement garrow_field_get_meatadata(),
garrow_field_with_metadata() and
garrow_field_with_merged_metadata(). I'll do it before
Apache Arrow 3.0.0.

So you can't read extension type for now. Sorry.


Thanks,
--
kou

In 
 
<cs1pr8401mb0822a99d196dd438b14d6d22eb...@cs1pr8401mb0822.namprd84.prod.outlook.com>
  "Re: [C-Glib] - writing an extension array" on Fri, 27 Nov 2020 05:15:56 
+0000,
  Ishan Anand <[email protected]> wrote:

> Hi Kou
> 
> Sure. Here are the code snippets as a github gist - 
> https://gist.github.com/ananis25/0b645ef94a70a0834fd23177e8721be9
> 
> Thank you for looking.
> 
> 
> ________________________________
> From: Sutou Kouhei <[email protected]>
> Sent: Friday, November 27, 2020 8:41 AM
> To: [email protected] <[email protected]>
> Subject: Re: [C-Glib] - writing an extension array
> 
> Hi,
> 
> Could you provide the Python script you used and the C
> program you used?
> 
> 
> Thanks,
> --
> kou
> 
> In
>  
> <cs1pr8401mb082208b574a83aff774f617ceb...@cs1pr8401mb0822.namprd84.prod.outlook.com>
>   "[C-Glib] - writing an extension array" on Thu, 26 Nov 2020 18:11:53 +0000,
>   Ishan Anand <[email protected]> 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

Reply via email to