Skip to content

TINKERPOP-3232 Coerce set into list when it contains non-hashable elements#3359

Open
xiazcy wants to merge 2 commits into3.7-devfrom
TINKERPOP-3232
Open

TINKERPOP-3232 Coerce set into list when it contains non-hashable elements#3359
xiazcy wants to merge 2 commits into3.7-devfrom
TINKERPOP-3232

Conversation

@xiazcy
Copy link
Contributor

@xiazcy xiazcy commented Mar 25, 2026

https://issues.apache.org/jira/browse/TINKERPOP-3232

Originally thought of using HashableDict, but ended up with deserializing into list instead due to potential hash collision and silent mutations of nested objects. Given gremlin-go also uses lists to back its custom set type, this wouldn't be an exclusion. Also this best preserves the inner data and type, which is usually what users operate on.

However, I did keep a commit with the HashableDict.of() in case we favor that solution instead. Note there could be an improvement to this, where we use frozenset for set instead of tuple in the HashableDict implementation.

(I will add CHANGELOG entry after the decision is made on the approach.)

VOTE +1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant