~ fixed ON expression set manipulation
authorEric Prud'hommeaux <bertails@w3.org>
Tue, 05 Jan 2010 11:55:39 -0500
changeset 111 c8f85edeec6b
parent 110 5a81d4582f14
child 112 42f8fa2dd03d
~ fixed ON expression set manipulation
src/main/scala/SQL.scala
--- a/src/main/scala/SQL.scala	Mon Jan 04 17:03:53 2010 -0500
+++ b/src/main/scala/SQL.scala	Tue Jan 05 11:55:39 2010 -0500
@@ -141,11 +141,11 @@
     {
       case "SELECT" ~ attributes ~ "FROM" ~ tablesANDons ~ whereexpr => {
 	val t:Set[Expression] = tablesANDons._2
-	val onConjoints = tablesANDons._2.foldLeft(Set[Expression]())((set, ent) =>
-	  ent match {
+	val onConjoints:Set[Expression] = tablesANDons._2.foldLeft(Set[Expression]())((s, ent) =>
+	  s ++ {ent match {
 	    case ExprConjunction(l) => l
 	    case _ => Set(ent)
-	  })
+	  }})
 	val conjoints = whereexpr match {
 	  case Some(ExprConjunction(l)) => onConjoints ++ l
 	  case Some(x) => onConjoints + x