paleolimbot opened a new issue, #845:
URL: https://github.com/apache/arrow-nanoarrow/issues/845

   In #738 we added support for dictionary encoded schemas and in #844 we will 
add support for connecting those schemas with the dictionary IDs that appear in 
the dictionary batch messages.
   
   Decoding dictionary arrays requires tracking dictionaries. Some code I 
removed from #738 to keep it simpler was along the lines of:
   
   ```c
   struct ArrowIpcDictionaryDecoder {
     int64_t id;
     struct ArrowIpcDecoder decoder;
   };
   
   ArrowErrorCode ArrowIpcDictionaryDecoderInit(struct 
ArrowIpcDictionaryDecoder* dictionary,
                                                const struct ArrowIpcDecoder* 
parent,
                                                int64_t id,
                                                struct ArrowSchema* 
value_schema);
   
   void ArrowIpcDictionaryDecoderReset(struct ArrowIpcDictionaryDecoder* 
dictionary);
   
   struct ArrowIpcDictionaries {
     struct ArrowIpcDictionaryDecoder* dictionaries;
     int64_t n_dictionaries;
     int64_t capacity;
   };
   
   void ArrowIpcDictionariesInit(struct ArrowIpcDictionaries* dictionaries);
   void ArrowIpcDictionariesReset(struct ArrowIpcDictionaries* dictionaries);
   
   ArrowErrorCode ArrowIpcDictionariesAppend(struct ArrowIpcDictionaries* 
dictionaries,
                                             const struct ArrowIpcDecoder* 
decoder,
                                             int64_t id, struct ArrowSchema* 
schema);
   ```
   
   Basically, every dictionary ID gets its own `ArrowIpcDecoder`, but we need 
to share the `ArrowIpcDictionaries*` because there might be nested dictionaries.


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