You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@s2graph.apache.org by st...@apache.org on 2017/07/01 15:28:26 UTC
[35/46] incubator-s2graph git commit: bug fix on edges.
bug fix on edges.
Project: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/commit/7f34d7b1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/tree/7f34d7b1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/diff/7f34d7b1
Branch: refs/heads/master
Commit: 7f34d7b1a349b29027689a842e822cb96818af5d
Parents: e77cbc8 a5b34e9
Author: DO YUNG YOON <st...@apache.org>
Authored: Wed May 3 16:44:13 2017 +0900
Committer: DO YUNG YOON <st...@apache.org>
Committed: Wed May 3 21:44:46 2017 +0900
----------------------------------------------------------------------
.../org/apache/s2graph/core/JSONParser.scala | 3 +-
.../scala/org/apache/s2graph/core/S2Edge.scala | 37 +--
.../scala/org/apache/s2graph/core/S2Graph.scala | 223 +++++++++++++++-
.../apache/s2graph/core/io/Conversions.scala | 8 +-
.../apache/s2graph/core/types/VertexId.scala | 2 +-
.../core/tinkerpop/S2GraphProvider.scala | 257 +++++++++++++------
.../core/tinkerpop/structure/S2GraphTest.scala | 75 +++++-
7 files changed, 487 insertions(+), 118 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/7f34d7b1/s2core/src/main/scala/org/apache/s2graph/core/S2Edge.scala
----------------------------------------------------------------------
diff --cc s2core/src/main/scala/org/apache/s2graph/core/S2Edge.scala
index eca8f18,28a0b06..ca336a7
--- a/s2core/src/main/scala/org/apache/s2graph/core/S2Edge.scala
+++ b/s2core/src/main/scala/org/apache/s2graph/core/S2Edge.scala
@@@ -647,8 -650,8 +650,9 @@@ case class S2Edge(innerGraph: S2Graph
val labelMeta = innerLabel.metaPropsInvMap.getOrElse(key, throw new java.lang.IllegalStateException(s"$key is not configured on Edge."))
if (propsWithTs.containsKey(key)) propsWithTs.get(key).asInstanceOf[Property[V]]
else {
-- val default = innerLabel.metaPropsDefaultMapInner(labelMeta)
-- propertyInner(key, default.innerVal.value, default.ts).asInstanceOf[Property[V]]
++ Property.empty()
++// val default = innerLabel.metaPropsDefaultMapInner(labelMeta)
++// propertyInner(key, default.innerVal.value, default.ts).asInstanceOf[Property[V]]
}
}
http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/7f34d7b1/s2core/src/main/scala/org/apache/s2graph/core/S2Graph.scala
----------------------------------------------------------------------
diff --cc s2core/src/main/scala/org/apache/s2graph/core/S2Graph.scala
index f05f2cb,66a8d46..7556165
--- a/s2core/src/main/scala/org/apache/s2graph/core/S2Graph.scala
+++ b/s2core/src/main/scala/org/apache/s2graph/core/S2Graph.scala
@@@ -1463,12 -1663,17 +1663,17 @@@ class S2Graph(_config: Config)(implici
}
val query = Query.toQuery(Seq(vertex), queryParams)
-
-// val queryRequests = queryParams.map { param => QueryRequest(query, 0, vertex, param) }
-// val ls = new util.ArrayList[Edge]()
-// fetches(queryRequests, Map.empty).map { stepResultLs =>
-// stepResultLs.foreach(_.edgeWithScores.foreach(es => ls.add(es.edge)))
-// ls.iterator()
-// }
-- getEdges(query).map { stepResult =>
-- val ls = new util.ArrayList[Edge]()
-- stepResult.edgeWithScores.foreach(es => ls.add(es.edge))
++ val queryRequests = queryParams.map { param => QueryRequest(query, 0, vertex, param) }
++ val ls = new util.ArrayList[Edge]()
++ fetches(queryRequests, Map.empty).map { stepResultLs =>
++ stepResultLs.foreach(_.edgeWithScores.foreach(es => ls.add(es.edge)))
ls.iterator()
}
++// getEdges(query).map { stepResult =>
++// val ls = new util.ArrayList[Edge]()
++// stepResult.edgeWithScores.foreach(es => ls.add(es.edge))
++// ls.iterator()
++// }
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/7f34d7b1/s2core/src/test/scala/org/apache/s2graph/core/tinkerpop/S2GraphProvider.scala
----------------------------------------------------------------------
diff --cc s2core/src/test/scala/org/apache/s2graph/core/tinkerpop/S2GraphProvider.scala
index d0761e1,fdd04af..37e011c
--- a/s2core/src/test/scala/org/apache/s2graph/core/tinkerpop/S2GraphProvider.scala
+++ b/s2core/src/test/scala/org/apache/s2graph/core/tinkerpop/S2GraphProvider.scala
@@@ -336,6 -423,6 +423,10 @@@ class S2GraphProvider extends AbstractG
}
override def convertLabel(label: String): String = {
-- label
++ label match {
++ case "blah1" => S2Graph.DefaultLabelName
++ case "blah2" => S2Graph.DefaultLabelName
++ case _ => label
++ }
}
}