You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Java] DictionaryProvider leaks memory while adding dictionaries with duplicate encoding #313
DictionaryProvider leaks memory while adding dictionaries with duplicate encoding. Is this expected? Should the provider release the memory of the existing dictionary vector if it accepts another one with same encoding id ?
That said, from what I see of when dictionary replacement/delta dictionaries in ARROW-7284 (apache/arrow#5945), instead of replacing the dictionary entirely it seems the existing code mutates the dictionary (for both replacement and delta dictionaries) which is why the library itself doesn't run into this. The provider should probably either close the old dictionary or throw an error if the dictionary is replaced instead of mutated.
David Li / @lidavidm: @davisusanibar I think this is purely an API design question. Note that the CDataDictionaryProvider has some comments on this too. If the behavior is expected, then it needs to be reflected in the docstring/API contract: dictionaries in a provider should be mutated, not directly replaced. And then we should raise an explicit error for the situation described here.
Apache Arrow JIRA Bot:
This issue was last updated over 90 days ago, which may be an indication it is no longer being actively worked. To better reflect the current state, the issue is being unassigned per project policy. Please feel free to re-take assignment of the issue if it is being actively worked, or if you plan to start that work soon.
Activity
asfimport commentedon Jun 28, 2022
David Li / @lidavidm:
CC @davisusanibar could you take a look?
That said, from what I see of when dictionary replacement/delta dictionaries in ARROW-7284 (apache/arrow#5945), instead of replacing the dictionary entirely it seems the existing code mutates the dictionary (for both replacement and delta dictionaries) which is why the library itself doesn't run into this. The provider should probably either close the old dictionary or throw an error if the dictionary is replaced instead of mutated.
asfimport commentedon Jul 1, 2022
David Dali Susanibar Arce / @davisusanibar:
Base on the comment about "ensure java implementation meets clarified dictionary spec apache/arrow#5945":
Current behavior is as expected as tested at https://github.com/apache/arrow/blob/f49547b1504d9a514fd847307a2a6715959dc5e1/java/vector/src/test/java/org/apache/arrow/vector/ipc/TestArrowReaderWriter.java#L521:L525.
Please let me know if your proposal is to start a discussion to change this behavior?
CC @lidavidm
asfimport commentedon Jul 1, 2022
David Li / @lidavidm:
@davisusanibar I think this is purely an API design question. Note that the CDataDictionaryProvider has some comments on this too. If the behavior is expected, then it needs to be reflected in the docstring/API contract: dictionaries in a provider should be mutated, not directly replaced. And then we should raise an explicit error for the situation described here.
asfimport commentedon Jul 1, 2022
David Dali Susanibar Arce / @davisusanibar:
Ok @lidavidm , it is clear now, let me work on that
asfimport commentedon Jul 1, 2022
David Dali Susanibar Arce / @davisusanibar:
@lidavidm What is the link docstring/API contract for Dictionary?
I am seeing docs/source/format and format but not sure where I could read docstring/API contract for Dictionary at this moment.
What is the link about comments for CDataDictionaryProvider also?
Thank you for your support.
asfimport commentedon Jul 1, 2022
David Li / @lidavidm:
I am talking about java docstrings. This is not anything to do with the format.
asfimport commentedon Sep 29, 2022
Apache Arrow JIRA Bot:
This issue was last updated over 90 days ago, which may be an indication it is no longer being actively worked. To better reflect the current state, the issue is being unassigned per project policy. Please feel free to re-take assignment of the issue if it is being actively worked, or if you plan to start that work soon.