From ac5231d371cbfbdcebacf07bd1d9d4b9ea0faf29 Mon Sep 17 00:00:00 2001 From: zhangmengzju Date: Tue, 14 Nov 2017 15:58:50 +0800 Subject: [PATCH] Update S2Graph.scala support "undirected" direction in toEdge function --- s2core/src/main/scala/org/apache/s2graph/core/S2Graph.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s2core/src/main/scala/org/apache/s2graph/core/S2Graph.scala b/s2core/src/main/scala/org/apache/s2graph/core/S2Graph.scala index d1eda5e4..7e1ae34e 100644 --- a/s2core/src/main/scala/org/apache/s2graph/core/S2Graph.scala +++ b/s2core/src/main/scala/org/apache/s2graph/core/S2Graph.scala @@ -1484,7 +1484,7 @@ class S2Graph(_config: Config)(implicit val ec: ExecutionContext) extends Graph val (ts, operation, logType, srcId, tgtId, label) = (parts(0), parts(1), parts(2), parts(3), parts(4), parts(5)) val props = if (parts.length >= 7) fromJsonToProperties(Json.parse(parts(6)).asOpt[JsObject].getOrElse(Json.obj())) else Map.empty[String, Any] val tempDirection = if (parts.length >= 8) parts(7) else "out" - val direction = if (tempDirection != "out" && tempDirection != "in") "out" else tempDirection + val direction = if (tempDirection != "out" && tempDirection != "in" && tempDirection != "undirected") "out" else tempDirection val edge = toEdge(srcId, tgtId, label, direction, props, ts.toLong, operation) Option(edge) } recover {