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

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

codecov-commenter commented on PR #1657:
URL: https://github.com/apache/tinkerpop/pull/1657#issuecomment-1126821628

   # 
[Codecov](https://codecov.io/gh/apache/tinkerpop/pull/1657?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#1657](https://codecov.io/gh/apache/tinkerpop/pull/1657?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
 (dc69004) into 
[3.5-dev](https://codecov.io/gh/apache/tinkerpop/commit/b170271060e52c129903fa32f8ffebc8617a3797?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
 (b170271) will **decrease** coverage by `5.33%`.
   > The diff coverage is `n/a`.
   
   ```diff
   @@             Coverage Diff             @@
   ##           3.5-dev    #1657      +/-   ##
   ===========================================
   - Coverage    72.22%   66.89%   -5.34%     
   ===========================================
     Files           25       23       -2     
     Lines         4353     3510     -843     
   ===========================================
   - Hits          3144     2348     -796     
   + Misses        1015      976      -39     
   + Partials       194      186       -8     
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/tinkerpop/pull/1657?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[gremlin-go/driver/cucumber/cucumberWorld.go](https://codecov.io/gh/apache/tinkerpop/pull/1657/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z3JlbWxpbi1nby9kcml2ZXIvY3VjdW1iZXIvY3VjdW1iZXJXb3JsZC5nbw==)
 | | |
   | 
[gremlin-go/driver/cucumber/gremlin.go](https://codecov.io/gh/apache/tinkerpop/pull/1657/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z3JlbWxpbi1nby9kcml2ZXIvY3VjdW1iZXIvZ3JlbWxpbi5nbw==)
 | | |
   
   ------
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/tinkerpop/pull/1657?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/tinkerpop/pull/1657?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
 Last update 
[b170271...dc69004](https://codecov.io/gh/apache/tinkerpop/pull/1657?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
 Read the [comment 
docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   




> IO read may use wrong cardinality for property
> ----------------------------------------------
>
>                 Key: TINKERPOP-2742
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2742
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: io
>            Reporter: Boxuan Li
>            Priority: Major
>
> g.io(...).read() might lose list/set properties. See the example below:
> {noformat}
> gremlin> graph = TinkerGraph.open()
> ==>tinkergraph[vertices:0 edges:0]
> gremlin> g = graph.traversal()
> ==>graphtraversalsource[tinkergraph[vertices:0 edges:0], standard]
> gremlin> v1 = g.addV().property("feature0", "0.0").property("feature0", 
> "1.1").next()
> ==>v[0]
> gremlin> g.V().valueMap()
> ==>[feature0:[0.0,1.1]]
> gremlin> g.io("graph.json").write().iterate()
> gremlin> g.V().drop()
> gremlin> g.io("graph.json").read().iterate()
> gremlin> g.V().valueMap()
> ==>[feature0:[1.1]]{noformat}
> By verifying "graph.json", I am sure the write() step works fine. The problem 
> is with read() step.
> In 
> [https://github.com/apache/tinkerpop/blob/5fdc7d3b5174f73475ca1a48920d5dec614ffc0e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/Attachable.java#L294-L298,]
>  it relies on the host graph to decide the cardinality for the given property 
> key. In TinkerGraph, `features().vertex().getCardinality(anything)` always 
> returns default cardinality SINGLE (unless otherwise configured), which means 
> all vertex properties are created with SINGLE cardinality, even if the graph 
> file itself contains multiple values for that property, as shown in the above 
> case.
>  
> I presume TinkerGraph is not the only one who suffers from this problem. For 
> example, for JanusGraph, if the default automatic schema maker is enabled, 
> and a property wasn't defined explicitly, then SINGLE cardinality is returned 
> by default. In this case, the loaded graph will be "wrong" in the sense that 
> it turns LIST/SET values into a SINGLE value.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to