[ 
https://issues.apache.org/jira/browse/TINKERPOP-3232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18069698#comment-18069698
 ] 

ASF GitHub Bot commented on TINKERPOP-3232:
-------------------------------------------

xiazcy commented on code in PR #3359:
URL: https://github.com/apache/tinkerpop/pull/3359#discussion_r3011744076


##########
docs/src/reference/gremlin-variants.asciidoc:
##########
@@ -2852,6 +2852,8 @@ is different from JVM languages which produces different 
`Set` results when thos
 is detected during deserialization, the `Set` is coerced to a `List` so that 
traversals return consistent
 results within a collection across different languages. If a `Set` is needed 
then convert `List` results
 to `Set` manually.
+* Traversals that return a `Set` containing non-hashable items, such as 
`Dictionary`, `Set` and `List`, will be coerced into a `List` during 
deserialization to avoid errors. If a `Set` is needed, convert the results

Review Comment:
   Updated





> Support deserialization of a set that has a non hashable element
> ----------------------------------------------------------------
>
>                 Key: TINKERPOP-3232
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-3232
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: python
>    Affects Versions: 3.8.0, 3.7.5
>            Reporter: Ken Hu
>            Priority: Blocker
>
> The set type in Python can only contain hashable types so it can't have 
> "container" types that are commonly returned in Gremlin. This causes issues 
> when trying to deserialize a Set that does contain these types as the set 
> will throw a TypeError.
> Some potential solutions include:
>  * Deserializing to list in these cases instead of set
>  * Using the HashableDict type from util like what was done for Map
> An example query that can return such an error is:
> {code:java}
> g.V().valueMap().dedup(Scope.local)
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to