manolama commented on code in PR #38423:
URL: https://github.com/apache/arrow/pull/38423#discussion_r1385848500


##########
java/vector/src/main/java/org/apache/arrow/vector/dictionary/DictionaryProvider.java:
##########
@@ -79,15 +84,24 @@ public final Set<Long> getDictionaryIds() {
     }
 
     @Override
-    public Dictionary lookup(long id) {
+    public BaseDictionary lookup(long id) {
       return map.get(id);
     }
 
     @Override
     public void close() {
-      for (Dictionary dictionary : map.values()) {
+      for (BaseDictionary dictionary : map.values()) {

Review Comment:
   Good question, what model of ownership does the Java impl follow? In the 
batch dictionary I offered a means of passing in two vectors in which case I'd 
assume the creator would be responsible for closing. Maybe I should remove that 
and if folks need nested dictionaries later we offer a ctor with a parent 
vector? Then the dictionary could be closed here.



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