Repository navigation
Deletion of SegString's values and offsets + more - #4773
Merged
Merged
Conversation
Signed-off-by: Vassily Litvinov <[email protected]>
vasslitvinov
force-pushed
the
segstrings
branch
from
August 8, 2025 00:24
3d9fef4 to
c336e6f
Compare
Rationale: I realized that having them in SymTab will significantly simplify the implementation of checkpointing for SegStringSymEntry. I came across Registry.chpl and observed that ObjType.STRINGS things are handled like ObjType.PDARRAY. On the surface STRINGS need to be treated like ObjType.SEGARRAY instead because they have two components, one of which is probably forgotten about when handling a STRINGS as a PDARRAY. Thankfully this did not affect me. --- Signed-off-by: Vassily Litvinov <[email protected]>
drculhane
pushed a commit
to drculhane/arkouda
that referenced
this pull request
Aug 20, 2025
Enable deletion of the "values" and "offsets" arrays of a `SegStringSymEntry` in the server when it is deleted itself. Implementation Notes A `SegStringSymEntry` is deleted after it is removed from the SymTab, which happens (I assume) when the corresponding Strings object is deleted in the client. Prior to this PR, "values" and "offsets" were thought to be handled / deleted by the client: ``` // NOTE: Clean-up, the client side pieces go out of scope and issue deletions on their own // so it is not necessary to manually remove these pieces from the SymTab // st.deleteEntry(offsetsName); // st.deleteEntry(valuesName); ``` however I did not observe that happening. So I added the removal of "values" and "offsets" from the SymTab, which should cause them to be deleted if nothing else references them. While there, I added an early `throw` to `arraySegString()` on non-uint8 invocations, since it did not work for those anyway. This means that the rest of the body will be ignored / dropped in such cases, reducing the generated code size. I also simplified `arraySegString()` significantly and made it return a `SegStringSymEntry`, avoiding the need for the client to combine "values" and "offsets" in a separate message to the server in `pdarraycreation.py`. While there also changed the "values" and "offsets" fields of `SegStringSymEntry` from `var` to `const`, to clarify their nature. --------- Signed-off-by: Vassily Litvinov <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enable deletion of the "values" and "offsets" arrays of a
SegStringSymEntryin the server when it is deleted itself.Implementation Notes
A
SegStringSymEntryis deleted after it is removed from the SymTab, which happens (I assume) when the corresponding Strings object is deleted in the client. Prior to this PR, "values" and "offsets" were thought to be handled / deleted by the client:however I did not observe that happening. So I added the removal of "values" and "offsets" from the SymTab, which should cause them to be deleted if nothing else references them.
While there, I added an early
throwtoarraySegString()on non-uint8 invocations, since it did not work for those anyway. This means that the rest of the body will be ignored / dropped in such cases, reducing the generated code size. I also simplifiedarraySegString()significantly and made it return aSegStringSymEntry, avoiding the need for the client to combine "values" and "offsets" in a separate message to the server inpdarraycreation.py.While there also changed the "values" and "offsets" fields of
SegStringSymEntryfromvartoconst, to clarify their nature.