ajwerner opened a new pull request, #6845:
URL: https://github.com/apache/arrow-rs/pull/6845

   The spec says that the keys in dictionaries are [0]:
   
   > (4) The index type of a Dictionary type can only be an integer type, 
preferably signed, with width 8 to 64 bits.
   
   In my use case I have a very small number of values so wasting bits on a 
wider key is wasteful.
   
   [0]: 
https://github.com/apache/arrow/blob/fe32a7dfe5e22e7737198476fe1ac0e8a5dccef2/docs/source/format/Columnar.rst?plain=1#L182-L183
   
   # Which issue does this PR close?
   
   Closes #6844
   
   # Rationale for this change
    
   I have a situation where I have lots of vectors of strings with mostly one 
string element and at most one per union member -- that means the dictionary 
keys fit in a single Int8. The builder infrastructure is rather convenient. I 
can get a solid single-digit reduction in the total size of my batches by using 
smaller keys. 
   
   


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