--- a/src/test/scala/RDB2RDFTest.scala Tue Jan 05 13:08:10 2010 -0500
+++ b/src/test/scala/RDB2RDFTest.scala Tue Jan 05 13:39:13 2010 -0500
@@ -570,32 +570,32 @@
R_emp1.id AS A_emp1,
R_emp1.birthday AS A_birthday
FROM Employee AS R_emp1
- WHERE (R_emp1.id IS NOT NULL)
- AND (R_emp1.birthday IS NOT NULL)
+ WHERE R_emp1.id IS NOT NULL
+ AND R_emp1.birthday IS NOT NULL
) AS R_opt1 ON R_emp1.id=R_opt1.A_emp1
- INNER JOIN Employee AS R_emp2 ON (R_emp1.lastName<R_emp2.lastName)
- AND (R_emp2.id IS NOT NULL)
- AND (R_emp2.lastName IS NOT NULL)
+ INNER JOIN Employee AS R_emp2 ON R_emp1.lastName<R_emp2.lastName
+ AND R_emp2.id IS NOT NULL
+ AND R_emp2.lastName IS NOT NULL
LEFT OUTER JOIN (
SELECT 3 AS _DISJOINT_,
R_emp2.id AS A_emp2,
R_emp2.birthday AS A_birthday
FROM Employee AS R_emp2
- WHERE (R_emp2.id IS NOT NULL)
- AND (R_emp2.birthday IS NOT NULL)
- ) AS R_opt3 ON (R_emp2.id=R_opt3.A_emp2)
- AND ((R_opt1._DISJOINT_ IS NULL) OR (R_opt1.A_birthday=R_opt3.A_birthday))
- INNER JOIN Employee AS R_emp3 ON ((R_opt1._DISJOINT_ IS NULL) OR (R_opt1.A_birthday=R_emp3.birthday))
- AND (R_emp2.lastName<R_emp3.lastName)
- AND (R_emp3.id IS NOT NULL)
- AND (R_emp3.lastName IS NOT NULL)
- INNER JOIN Employee AS R_emp4 ON (R_emp3.lastName<R_emp4.lastName)
- AND ((R_opt1._DISJOINT_ IS NULL) OR (R_opt1.A_birthday=R_emp4.birthday))
- AND (R_emp4.id IS NOT NULL)
- AND (R_emp4.lastName IS NOT NULL)
- WHERE (R_emp1.id IS NOT NULL)
- AND (R_emp1.lastName IS NOT NULL)
- AND (R_opt1.A_birthday IS NOT NULL)
+ WHERE R_emp2.id IS NOT NULL
+ AND R_emp2.birthday IS NOT NULL
+ ) AS R_opt3 ON R_emp2.id=R_opt3.A_emp2
+ AND (R_opt1._DISJOINT_ IS NULL OR R_opt1.A_birthday=R_opt3.A_birthday)
+ INNER JOIN Employee AS R_emp3 ON (R_opt1._DISJOINT_ IS NULL OR R_opt1.A_birthday=R_emp3.birthday)
+ AND R_emp2.lastName<R_emp3.lastName
+ AND R_emp3.id IS NOT NULL
+ AND R_emp3.lastName IS NOT NULL
+ INNER JOIN Employee AS R_emp4 ON R_emp3.lastName<R_emp4.lastName
+ AND (R_opt1._DISJOINT_ IS NULL OR R_opt1.A_birthday=R_emp4.birthday)
+ AND R_emp4.id IS NOT NULL
+ AND R_emp4.lastName IS NOT NULL
+ WHERE R_emp1.id IS NOT NULL
+ AND R_emp1.lastName IS NOT NULL
+ AND R_opt1.A_birthday IS NOT NULL
""").get
assert(RDB2RDF(db2, sparqlSelect, StemURI("http://hr.example/DB/"), PrimaryKey(Attribute(Name("id"))), false, false) === sqlSelect)
}