Repository: incubator-s2graph Updated Branches: refs/heads/master 2362a84d1 -> 5ccfa2821
[S2GRAPH-38]: Transform option gives wrong result since it transform degree edge too. skip convertEdges on degreeEdge. not include degreeEdge to exclude/include edges in filterEdges logic. JIRA: [S2GRAPH-38] https://issues.apache.org/jira/browse/S2GRAPH-38 Pull Request: Closes #21 Project: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/commit/5ccfa282 Tree: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/tree/5ccfa282 Diff: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/diff/5ccfa282 Branch: refs/heads/master Commit: 5ccfa282123053eae353412f6e5f690bff65e986 Parents: 2362a84 Author: DO YUNG YOON <[email protected]> Authored: Tue Feb 23 16:37:03 2016 +0900 Committer: DO YUNG YOON <[email protected]> Committed: Tue Feb 23 16:37:03 2016 +0900 ---------------------------------------------------------------------- CHANGES | 2 ++ s2core/src/main/scala/com/kakao/s2graph/core/Graph.scala | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/5ccfa282/CHANGES ---------------------------------------------------------------------- diff --git a/CHANGES b/CHANGES index 9fef99d..bc4c9ec 100644 --- a/CHANGES +++ b/CHANGES @@ -32,6 +32,8 @@ Release 0.12.1 - unreleased S2GRAPH-28: _to option gives wrong result on query. (Contributed by Hyunsung Jo<[email protected]>, committed by DOYUNG YOON) + + S2GRAPH-38: Transform option gives wrong result since it transform degree edge too (Committed by DOYUNG YOON). TASKS http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/5ccfa282/s2core/src/main/scala/com/kakao/s2graph/core/Graph.scala ---------------------------------------------------------------------- diff --git a/s2core/src/main/scala/com/kakao/s2graph/core/Graph.scala b/s2core/src/main/scala/com/kakao/s2graph/core/Graph.scala index 75659c1..76d3151 100644 --- a/s2core/src/main/scala/com/kakao/s2graph/core/Graph.scala +++ b/s2core/src/main/scala/com/kakao/s2graph/core/Graph.scala @@ -77,7 +77,7 @@ object Graph { /** common methods for filter out, transform, aggregate queryResult */ def convertEdges(queryParam: QueryParam, edge: Edge, nextStepOpt: Option[Step]): Seq[Edge] = { for { - convertedEdge <- queryParam.transformer.transform(edge, nextStepOpt) + convertedEdge <- queryParam.transformer.transform(edge, nextStepOpt) if !edge.isDegree } yield convertedEdge } @@ -243,10 +243,10 @@ object Graph { val (hashKey, filterHashKey) = toHashKey(queryParam, convertedEdge, isDegree) /** check if this edge should be exlcuded. */ - if (shouldBeExcluded) { + if (shouldBeExcluded && !isDegree) { edgesToExclude.add(filterHashKey) } else { - if (shouldBeIncluded) { + if (shouldBeIncluded && !isDegree) { edgesToInclude.add(filterHashKey) } val tsVal = processTimeDecay(queryParam, convertedEdge)
