From: <mrp...@us...> - 2011-01-20 17:49:23
|
Revision: 4141 http://bigdata.svn.sourceforge.net/bigdata/?rev=4141&view=rev Author: mrpersonick Date: 2011-01-20 17:49:16 +0000 (Thu, 20 Jan 2011) Log Message: ----------- working through tck failures Modified Paths: -------------- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/BOpUtility.java branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/sop/SOpTreeBuilder.java branches/QUADS_QUERY_BRANCH/bigdata-sails/src/test/com/bigdata/rdf/sail/tck/BigdataSparqlTest.java Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/BOpUtility.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/BOpUtility.java 2011-01-20 17:48:21 UTC (rev 4140) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/BOpUtility.java 2011-01-20 17:49:16 UTC (rev 4141) @@ -745,14 +745,11 @@ s = s.replaceAll("com.bigdata.bop.join.", ""); s = s.replaceAll("com.bigdata.bop.solutions.", ""); s = s.replaceAll("com.bigdata.bop.rdf.filter.", ""); + s = s.replaceAll("com.bigdata.bop.bset", ""); s = s.replaceAll("com.bigdata.bop.", ""); s = s.replaceAll("com.bigdata.rdf.sail.", ""); s = s.replaceAll("com.bigdata.rdf.spo.", ""); -// s = s.replaceAll("com.bigdata.bop..", ""); -// s = s.replaceAll("com.bigdata.bop..", ""); -// s = s.replaceAll("com.bigdata.bop..", ""); -// s = s.replaceAll("com.bigdata.bop..", ""); -// s = s.replaceAll("com.bigdata.bop..", ""); + s = s.replaceAll("com.bigdata.rdf.internal.constraints.", ""); return s; } @@ -1027,3 +1024,4 @@ } } + Modified: branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/sop/SOpTreeBuilder.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/sop/SOpTreeBuilder.java 2011-01-20 17:48:21 UTC (rev 4140) +++ branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/sop/SOpTreeBuilder.java 2011-01-20 17:49:16 UTC (rev 4141) @@ -236,6 +236,8 @@ } else if (arg instanceof LeftJoin) { // collectSOps(sops, (LeftJoin) arg, rslj, groupId.incrementAndGet(), g); collectSOps(sops, (LeftJoin) arg, rslj, g, pg); + } else if (arg instanceof SingletonSet) { + // do nothing } else { throw new UnsupportedOperatorException(arg); } Modified: branches/QUADS_QUERY_BRANCH/bigdata-sails/src/test/com/bigdata/rdf/sail/tck/BigdataSparqlTest.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/test/com/bigdata/rdf/sail/tck/BigdataSparqlTest.java 2011-01-20 17:48:21 UTC (rev 4140) +++ branches/QUADS_QUERY_BRANCH/bigdata-sails/src/test/com/bigdata/rdf/sail/tck/BigdataSparqlTest.java 2011-01-20 17:49:16 UTC (rev 4141) @@ -41,11 +41,18 @@ import junit.framework.TestSuite; import org.apache.log4j.Logger; +import org.openrdf.model.Statement; import org.openrdf.query.Dataset; +import org.openrdf.query.Query; +import org.openrdf.query.QueryLanguage; +import org.openrdf.query.TupleQuery; +import org.openrdf.query.TupleQueryResult; import org.openrdf.query.parser.sparql.ManifestTest; import org.openrdf.query.parser.sparql.SPARQLQueryTest; import org.openrdf.repository.Repository; +import org.openrdf.repository.RepositoryConnection; import org.openrdf.repository.RepositoryException; +import org.openrdf.repository.RepositoryResult; import org.openrdf.repository.dataset.DatasetRepository; import org.openrdf.repository.sail.SailRepository; import org.openrdf.sail.memory.MemoryStore; @@ -55,8 +62,8 @@ import com.bigdata.journal.BufferMode; import com.bigdata.journal.IIndexManager; import com.bigdata.rdf.sail.BigdataSail; +import com.bigdata.rdf.sail.BigdataSail.Options; import com.bigdata.rdf.sail.BigdataSailRepository; -import com.bigdata.rdf.sail.BigdataSail.Options; /** * Test harness for running the SPARQL test suites. @@ -173,68 +180,71 @@ */ static final Collection<String> testURIs = Arrays.asList(new String[] { -// busted with EvalStrategy1 -// "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#nested-opt-2", -// "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#filter-scope-1", -// "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#join-scope-1", -// "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional/manifest#dawg-optional-complex-4", - -// busted with EvalStrategy2 with LeftJoin enabled -// "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-eq-12", -// "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#nested-opt-1", -// "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#opt-filter-1", -// "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#opt-filter-2", -// "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional/manifest#dawg-optional-complex-3", -// "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional-filter/manifest#dawg-optional-filter-001", -// "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional-filter/manifest#dawg-optional-filter-004", - -// Dataset crap -// "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/i18n/manifest#normalization-1", - -// "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/dataset/manifest#dawg-dataset-01", - -// "http://www.w3.org/2001/sw/DataAccess/tests/data-r2//manifest#", -// "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-str-1", -// "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-str-2", -// "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#dawg-datatype-1", -// "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#sameTerm-simple", -// "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#sameTerm-eq", -// "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-builtin/manifest#sameTerm-not-eq", -// -// "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-equals/manifest#eq-graph-1", -// "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-equals/manifest#eq-graph-2", - - /* - * Tests which fail with 2 data services. - */ -// "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#bgp-no-match",//Ok -// "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#prefix-name-1",//OK -// "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/basic/manifest#spoo-1",//BOOM - -// "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/graph/manifest#dawg-graph-05", + /* + * working through the new query engine failures: 0 errors, 19 failures + */ + /* + * Basically we are having a lot of problems with our compare + * operator, which is supposed to do fuzzy comparisons that + * sometimes requires materialized RDF values. These I feel I can + * handle on my own. + */ + + // "a" and "a"^^xsd:string have different term ids? also bnodes are different + "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-eq-07", + "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-eq-08", + "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-eq-10", + "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-eq-11", + "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-eq-12", + "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-cmp-01", + "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-cmp-02", + + /* + * These tests have to do with that that weird "well designed" + * optional nesting P = A OPT (B OPT C) where A and C share + * variables not in B. I think I can handle these on my own. + */ + "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#nested-opt-1", + "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#join-scope-1", + /* - * working through the new query engine failures + * Everything below this point I need help with. */ - // please someone explain this shit to me -// "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-eq-12" + /* + * These failures have to do with nested UNIONs - we don't seem to + * be handling them correctly at all. + */ + "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#join-combo-1", + "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#join-combo-2", + "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional/manifest#dawg-optional-complex-2", + "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional/manifest#dawg-optional-complex-4", - // this is that weird "well designed" optional shit P = A OPT (B OPT C) where A and C share variables not in B -// "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#nested-opt-1" - - // where do we put the !bound(?e) constraint??? -// "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/bound/manifest#dawg-bound-query-001" + /* + * This one is truly bizarre - involving a non-optional subquuery + * plus an optional subquery. Don't even know where to start on this + * guy. + */ + "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#filter-scope-1", - // "a" and "a"^^xsd:string have different term ids? also bnodes are different -// "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/open-world/manifest#open-eq-07" + /* + * Sometimes, a filter is the entire join group, and it should not + * be able to see variables outside the group. Frankly I do not + * understand this one. + */ + "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#filter-nested-2", + + /* + * These demonstrate the problem of where to put non-optional + * filters that need to be evaluated after optional tails and + * optional join groups. + */ + "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/bound/manifest#dawg-bound-query-001", + "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional/manifest#dawg-optional-complex-1", + "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional-filter/manifest#dawg-optional-filter-002", + "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional-filter/manifest#dawg-optional-filter-003", - // help, non-optional subquery?? wtf -// "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/algebra/manifest#filter-scope-1" - - // this uncovers an obvious bug in our SubqueryOp -// "http://www.w3.org/2001/sw/DataAccess/tests/data-r2/optional-filter/manifest#dawg-optional-filter-001" - }); /** @@ -471,42 +481,42 @@ } -// @Override -// protected void runTest() -// throws Exception -// { -// RepositoryConnection con = getQueryConnection(dataRep); -// try { -// + @Override + protected void runTest() + throws Exception + { + RepositoryConnection con = getQueryConnection(dataRep); + try { + // log.info("database dump:"); // RepositoryResult<Statement> stmts = con.getStatements(null, null, null, false); // while (stmts.hasNext()) { // log.info(stmts.next()); // } -// log.info("dataset:\n" + dataset); -// -// String queryString = readQueryString(); -// log.info("query:\n" + getQueryString()); -// -// Query query = con.prepareQuery(QueryLanguage.SPARQL, queryString, queryFileURL); -// if (dataset != null) { -// query.setDataset(dataset); -// } -// -// if (query instanceof TupleQuery) { -// TupleQueryResult queryResult = ((TupleQuery)query).evaluate(); -// while (queryResult.hasNext()) { -// log.info("query result:\n" + queryResult.next()); -// } -// } -// -// } -// finally { -// con.close(); -// } -// -// super.runTest(); -// } + log.info("dataset:\n" + dataset); + + String queryString = readQueryString(); + log.info("query:\n" + getQueryString()); + + Query query = con.prepareQuery(QueryLanguage.SPARQL, queryString, queryFileURL); + if (dataset != null) { + query.setDataset(dataset); + } + + if (query instanceof TupleQuery) { + TupleQueryResult queryResult = ((TupleQuery)query).evaluate(); + while (queryResult.hasNext()) { + log.info("query result:\n" + queryResult.next()); + } + } + + } + finally { + con.close(); + } + + super.runTest(); + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |