55 failed.
Project: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/commit/549279d9 Tree: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/tree/549279d9 Diff: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/diff/549279d9 Branch: refs/heads/master Commit: 549279d91cb0195357d02855ba5a49b55ea63564 Parents: 7f34d7b Author: DO YUNG YOON <[email protected]> Authored: Thu May 4 01:03:54 2017 +0900 Committer: DO YUNG YOON <[email protected]> Committed: Thu May 4 01:03:54 2017 +0900 ---------------------------------------------------------------------- .../scala/org/apache/s2graph/core/S2Edge.scala | 4 +-- .../org/apache/s2graph/core/S2Vertex.scala | 6 +++- .../core/tinkerpop/S2GraphProvider.scala | 32 +++++++++++++++++++- 3 files changed, 38 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/549279d9/s2core/src/main/scala/org/apache/s2graph/core/S2Edge.scala ---------------------------------------------------------------------- diff --git a/s2core/src/main/scala/org/apache/s2graph/core/S2Edge.scala b/s2core/src/main/scala/org/apache/s2graph/core/S2Edge.scala index ca336a7..fa9ff62 100644 --- a/s2core/src/main/scala/org/apache/s2graph/core/S2Edge.scala +++ b/s2core/src/main/scala/org/apache/s2graph/core/S2Edge.scala @@ -538,8 +538,8 @@ case class S2Edge(innerGraph: S2Graph, } def toLogString: String = { - val allPropsWithName = defaultPropsWithName ++ Json.toJson(propsWithName).asOpt[JsObject].getOrElse(Json.obj()) - List(ts, GraphUtil.fromOp(op), "e", srcVertex.innerId, tgtVertex.innerId, innerLabel.label, allPropsWithName).mkString("\t") +// val allPropsWithName = defaultPropsWithName ++ Json.toJson(propsWithName).asOpt[JsObject].getOrElse(Json.obj()) + List(ts, GraphUtil.fromOp(op), "e", srcVertex.innerId, tgtVertex.innerId, innerLabel.label, propsWithTs).mkString("\t") } override def hashCode(): Int = { http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/549279d9/s2core/src/main/scala/org/apache/s2graph/core/S2Vertex.scala ---------------------------------------------------------------------- diff --git a/s2core/src/main/scala/org/apache/s2graph/core/S2Vertex.scala b/s2core/src/main/scala/org/apache/s2graph/core/S2Vertex.scala index 64d298d..5277851 100644 --- a/s2core/src/main/scala/org/apache/s2graph/core/S2Vertex.scala +++ b/s2core/src/main/scala/org/apache/s2graph/core/S2Vertex.scala @@ -150,7 +150,11 @@ case class S2Vertex(graph: S2Graph, Label.findBySrcColumnId(id.colId).map(l => l.label -> direction.name) } } else { - labelNames.map(_ -> direction.name()) + direction match { + case Direction.BOTH => + Seq(Direction.OUT, Direction.IN).flatMap { dir => labelNames.map(_ -> dir.name()) } + case _ => labelNames.map(_ -> direction.name()) + } } graph.fetchEdges(this, labelNameWithDirs) http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/549279d9/s2core/src/test/scala/org/apache/s2graph/core/tinkerpop/S2GraphProvider.scala ---------------------------------------------------------------------- diff --git a/s2core/src/test/scala/org/apache/s2graph/core/tinkerpop/S2GraphProvider.scala b/s2core/src/test/scala/org/apache/s2graph/core/tinkerpop/S2GraphProvider.scala index 37e011c..db55c03 100644 --- a/s2core/src/test/scala/org/apache/s2graph/core/tinkerpop/S2GraphProvider.scala +++ b/s2core/src/test/scala/org/apache/s2graph/core/tinkerpop/S2GraphProvider.scala @@ -74,7 +74,7 @@ object S2GraphProvider { val labelNames = Set(S2Graph.DefaultLabelName, "knows", "created", "bought", "test", "self", "friends", "friend", "hate", "collaborator", "test1", "test2", "test3", "pets", "walks", "hates", "link", - "codeveloper", "createdBy", "existsWith", "writtenBy", "sungBy", "followedBy", "uses") + "codeveloper", "createdBy", "existsWith", "writtenBy", "sungBy", "followedBy", "uses", "likes", "foo", "bar") columnNames.foreach { columnName => Management.deleteColumn(S2Graph.DefaultServiceName, columnName) @@ -403,6 +403,36 @@ class S2GraphProvider extends AbstractGraphProvider { options = Option("""{"skipReverse": false}""") ) + val likes = mnt.createLabel("likes", + defaultService.serviceName, "person", "integer", + defaultService.serviceName, "person", "integer", + true, defaultService.serviceName, Nil, + Seq( + Prop("year", "0", "integer") + ), "strong", None, None, + options = Option("""{"skipReverse": false}""") + ) + + val foo = mnt.createLabel("foo", + defaultService.serviceName, "person", "integer", + defaultService.serviceName, "person", "integer", + true, defaultService.serviceName, Nil, + Seq( + Prop("year", "0", "integer") + ), "strong", None, None, + options = Option("""{"skipReverse": false}""") + ) + + val bar = mnt.createLabel("bar", + defaultService.serviceName, "person", "integer", + defaultService.serviceName, "person", "integer", + true, defaultService.serviceName, Nil, + Seq( + Prop("year", "0", "integer") + ), "strong", None, None, + options = Option("""{"skipReverse": false}""") + ) + super.loadGraphData(graph, loadGraphWith, testClass, testName) }
