Daniel Kuppitz created TINKERPOP-1336:
-----------------------------------------

             Summary: normSack doesn't work in OLAP
                 Key: TINKERPOP-1336
                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1336
             Project: TinkerPop
          Issue Type: Bug
          Components: process
    Affects Versions: 3.2.0-incubating
            Reporter: Daniel Kuppitz


When {{normSack}} is used in OLAP query, all sack values become the same. Maybe 
that's "expected"..? But then it should be mentioned in the docs.

{noformat}
gremlin> g = TinkerFactory.createModern().traversal()
==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]
gremlin> a = TinkerFactory.createModern().traversal().withComputer()
==>graphtraversalsource[tinkergraph[vertices:6 edges:6], graphcomputer]

gremlin> 
g.withSack(0).V().as("v").repeat(outE().sack(sum).by("weight").inV()).times(2).sack().as("w").select("v","w")
==>[v:v[1], w:2.0]
==>[v:v[1], w:1.4]
gremlin> 
g.withSack(0).V().as("v").repeat(outE().sack(sum).by("weight").inV()).times(2).barrier(normSack).sack().as("w").select("v","w")
==>[v:v[1], w:0.5882352941176471]
==>[v:v[1], w:0.4117647058823529]

gremlin> 
a.withSack(0).V().as("v").repeat(outE().sack(sum).by("weight").inV()).times(2).sack().as("w").select("v","w")
==>[v:v[1], w:1.4]
==>[v:v[1], w:2.0]
gremlin> 
a.withSack(0).V().as("v").repeat(outE().sack(sum).by("weight").inV()).times(2).barrier(normSack).sack().as("w").select("v","w")
==>[v:v[1], w:0.5]
==>[v:v[1], w:0.5]
{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to