This is an automated email from the ASF dual-hosted git repository.
sergeykamov pushed a commit to branch NLPCRAFT-30
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/NLPCRAFT-30 by this push:
new 7024e92 WIP.
7024e92 is described below
commit 7024e920ac3a72206d259a758986b28c1f6a884a
Author: Sergey Kamov <[email protected]>
AuthorDate: Tue Apr 14 21:02:16 2020 +0300
WIP.
---
.../nlpcraft/examples/sql/db/SqlBuilder.scala | 27 ++++++++++------------
1 file changed, 12 insertions(+), 15 deletions(-)
diff --git
a/src/main/scala/org/apache/nlpcraft/examples/sql/db/SqlBuilder.scala
b/src/main/scala/org/apache/nlpcraft/examples/sql/db/SqlBuilder.scala
index fd26ed8..2d5fd82 100644
--- a/src/main/scala/org/apache/nlpcraft/examples/sql/db/SqlBuilder.scala
+++ b/src/main/scala/org/apache/nlpcraft/examples/sql/db/SqlBuilder.scala
@@ -190,21 +190,18 @@ case class SqlBuilder(schema: NCSqlSchema) extends
LazyLogging {
Seq(path.getStart.asInstanceOf[Vertex].name,
path.getEnd.asInstanceOf[Vertex].name)
}
- ext.combinations(2).flatMap(pair ⇒
- try
- getPath(pair.head, pair.last)
- catch {
- case _ : GraphException ⇒
- try
- getPath(pair.last, pair.head)
- catch {
- case _ : GraphException ⇒ Seq.empty
- }
- }
- ).
- toSeq.
- distinct.
- map(schemaTabsByNames)
+ ext.combinations(2).flatMap(pair ⇒
+ try
+ getPath(pair.head, pair.last)
+ catch {
+ case _ : GraphException ⇒
+ try
+ getPath(pair.last, pair.head)
+ catch {
+ case _ : GraphException ⇒ Seq.empty
+ }
+ }
+ ).toSeq.distinct.map(schemaTabsByNames)
}
}