|
From: <jer...@us...> - 2013-10-01 20:15:07
|
Revision: 7424
http://bigdata.svn.sourceforge.net/bigdata/?rev=7424&view=rev
Author: jeremy_carroll
Date: 2013-10-01 20:14:59 +0000 (Tue, 01 Oct 2013)
Log Message:
-----------
Moved and renamed the 500 tests to not just check the optimization step, but also to run the queries
Added Paths:
-----------
branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/TestNoExceptions.java
branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/filterSubselect737.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/nestedSubselectsWithUnion737.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/ticket746.rq
Removed Paths:
-------------
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/optimizers/TestASTOptimizer500s.java
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/optimizers/filterSubselect737.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/optimizers/nestedSubselectsWithUnion737.rq
branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/optimizers/ticket746.rq
Deleted: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/optimizers/TestASTOptimizer500s.java
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/optimizers/TestASTOptimizer500s.java 2013-10-01 17:57:50 UTC (rev 7423)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/optimizers/TestASTOptimizer500s.java 2013-10-01 20:14:59 UTC (rev 7424)
@@ -1,192 +0,0 @@
-/**
-
-Copyright (C) SYSTAP, LLC 2006-2013. All rights reserved.
-
-Contact:
- SYSTAP, LLC
- 4501 Tower Road
- Greensboro, NC 27410
- lic...@bi...
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; version 2 of the License.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-/*
- * Created on Oct 1, 2013
- */
-
-package com.bigdata.rdf.sparql.ast.optimizers;
-
-import java.io.IOException;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.LinkedList;
-
-import org.apache.commons.io.IOUtils;
-import org.openrdf.model.impl.URIImpl;
-import org.openrdf.model.vocabulary.RDF;
-import org.openrdf.model.vocabulary.RDFS;
-import org.openrdf.query.BindingSet;
-import org.openrdf.query.MalformedQueryException;
-import org.openrdf.query.algebra.StatementPattern.Scope;
-import org.openrdf.query.algebra.evaluation.QueryBindingSet;
-
-import com.bigdata.bop.BOpUtility;
-import com.bigdata.bop.IBindingSet;
-import com.bigdata.bop.IVariable;
-import com.bigdata.bop.Var;
-import com.bigdata.bop.bindingSet.EmptyBindingSet;
-import com.bigdata.rdf.internal.IV;
-import com.bigdata.rdf.sail.sparql.Bigdata2ASTSPARQLParser;
-import com.bigdata.rdf.sail.sparql.TestSubqueryPatterns;
-import com.bigdata.rdf.sail.sparql.ast.ParseException;
-import com.bigdata.rdf.sail.sparql.ast.TokenMgrError;
-import com.bigdata.rdf.sparql.ast.ASTContainer;
-import com.bigdata.rdf.sparql.ast.AbstractASTEvaluationTestCase;
-import com.bigdata.rdf.sparql.ast.ConstantNode;
-import com.bigdata.rdf.sparql.ast.IQueryNode;
-import com.bigdata.rdf.sparql.ast.JoinGroupNode;
-import com.bigdata.rdf.sparql.ast.NamedSubqueriesNode;
-import com.bigdata.rdf.sparql.ast.NamedSubqueryInclude;
-import com.bigdata.rdf.sparql.ast.NamedSubqueryRoot;
-import com.bigdata.rdf.sparql.ast.ProjectionNode;
-import com.bigdata.rdf.sparql.ast.QueryRoot;
-import com.bigdata.rdf.sparql.ast.QueryType;
-import com.bigdata.rdf.sparql.ast.StatementPatternNode;
-import com.bigdata.rdf.sparql.ast.StaticAnalysis;
-import com.bigdata.rdf.sparql.ast.SubqueryRoot;
-import com.bigdata.rdf.sparql.ast.ValueExpressionNode;
-import com.bigdata.rdf.sparql.ast.VarNode;
-import com.bigdata.rdf.sparql.ast.eval.AST2BOpContext;
-import com.bigdata.rdf.vocab.decls.FOAFVocabularyDecl;
-
-/**
- * This test suite is for trac items where the failure mode is a 500 error caused
- * by a software error in the static optimizer.
- *
- * The tests each consist of a test query in a file in this package.
- * The typical test succeeds if the optimizers run on this query without a disaster.
- * This test suite does NOT have either of the following objectives:
- * - that the static optimizer is correct in the sense that the optimized query has the same meaning as the original query
- * or
- * - an optimizer in the sense that the optimized query is likely to be faster than the original query.
- *
- * The very limited goal is that no uncaught exceptions are thrown!
- *
- */
-public class TestASTOptimizer500s extends
- AbstractASTEvaluationTestCase {
-
- /**
- *
- */
- public TestASTOptimizer500s() {
- }
-
- /**
- * @param name
- */
- public TestASTOptimizer500s(String name) {
- super(name);
- }
-
-
- /**
- * Unit test for WITH {subquery} AS "name" and INCLUDE. The WITH must be in
- * the top-level query.
- *
- * This is specifically for Trac 746 which crashed out during optimize.
- * So the test simply runs that far, and does not verify anything
- * other than the ability to optimize without an exception
- * @throws IOException
- */
- public void test_namedSubquery746() throws MalformedQueryException,
- TokenMgrError, ParseException, IOException {
- optimizeQuery("ticket746");
-
- }
-
-/**
- * <pre>
-SELECT *
-{ { SELECT * { ?s ?p ?o } LIMIT 1 }
- FILTER ( ?s = <eg:a> )
-}
- </pre>
- * @throws MalformedQueryException
- * @throws TokenMgrError
- * @throws ParseException
- * @throws IOException
- */
- public void test_filterSubselect737() throws MalformedQueryException,
- TokenMgrError, ParseException, IOException {
- optimizeQuery("filterSubselect737");
-
- }
-
-
-/**
- * <pre>
-SELECT *
-WHERE {
-
- { FILTER ( false ) }
- UNION
- {
- { SELECT ?Subject_A
- WHERE {
- { SELECT $j__5 ?Subject_A
- {
- } ORDER BY $j__5
- }
- } GROUP BY ?Subject_A
- }
- }
- OPTIONAL {
- { SELECT ?Subject_A
- WHERE {
- { SELECT $j__8 ?Subject_A
- {
-
- } ORDER BY $j_8
- }
- } GROUP BY ?Subject_A
- }
- }
-}
- </pre>
- * @throws MalformedQueryException
- * @throws TokenMgrError
- * @throws ParseException
- * @throws IOException
- */
- public void test_nestedSubselectsWithUnion737() throws MalformedQueryException,
- TokenMgrError, ParseException, IOException {
- optimizeQuery("nestedSubselectsWithUnion737");
-
- }
-
- void optimizeQuery(final String queryfile) throws IOException, MalformedQueryException {
- final String sparql = IOUtils.toString(getClass().getResourceAsStream(queryfile+".rq"));
-
-
- final QueryRoot ast = new Bigdata2ASTSPARQLParser(store).parseQuery2(sparql,baseURI).getOriginalAST();
-
- final IASTOptimizer rewriter = new DefaultOptimizerList();
-
- final AST2BOpContext context = new AST2BOpContext(new ASTContainer(ast), store);
- rewriter.optimize(context, ast/* queryNode */, new IBindingSet[]{EmptyBindingSet.INSTANCE});
- }
-
-}
Deleted: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/optimizers/filterSubselect737.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/optimizers/filterSubselect737.rq 2013-10-01 17:57:50 UTC (rev 7423)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/optimizers/filterSubselect737.rq 2013-10-01 20:14:59 UTC (rev 7424)
@@ -1,4 +0,0 @@
-SELECT *
-{ { SELECT * { ?s ?p ?o } LIMIT 1 }
- FILTER ( ?s = <eg:a> )
-}
\ No newline at end of file
Deleted: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/optimizers/nestedSubselectsWithUnion737.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/optimizers/nestedSubselectsWithUnion737.rq 2013-10-01 17:57:50 UTC (rev 7423)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/optimizers/nestedSubselectsWithUnion737.rq 2013-10-01 20:14:59 UTC (rev 7424)
@@ -1,27 +0,0 @@
-SELECT *
-WHERE {
-
- { FILTER ( false ) }
- UNION
- {
- { SELECT ?Subject_A
- WHERE {
- { SELECT $j__5 ?Subject_A
- {
- } ORDER BY $j__5
- }
- } GROUP BY ?Subject_A
- }
- }
- OPTIONAL {
- { SELECT ?Subject_A
- WHERE {
- { SELECT $j__8 ?Subject_A
- {
-
- } ORDER BY $j_8
- }
- } GROUP BY ?Subject_A
- }
- }
-}
\ No newline at end of file
Deleted: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/optimizers/ticket746.rq
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/optimizers/ticket746.rq 2013-10-01 17:57:50 UTC (rev 7423)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/optimizers/ticket746.rq 2013-10-01 20:14:59 UTC (rev 7424)
@@ -1,35 +0,0 @@
-base <http://example.org/>
-prefix sys: </bdm/api/kbobject/sys:>
-prefix base: </bdm/api/kbobject/base:>
-prefix syapse: </graph/syapse#>
-prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
-prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
-
-SELECT *
-
-WITH {
-SELECT *
-
-WHERE {
-
- OPTIONAL {
- base:disease syapse:hasLiteralProperty $j2 .
- ?Sample_A $j2 ?j1
- }
- OPTIONAL {
- base:species syapse:hasLiteralProperty $j4 .
- ?Sample_A $j4 ?j3
- }
- OPTIONAL {
- ?Sample_A sys:name ?j5
- }
- ?Sample_A rdf:type / rdfs:subClassOf * base:MammalianCellLineSample
-}
-
-} AS %__UserQuery
-
-WHERE {
-
-INCLUDE %__UserQuery
-
-}
Copied: branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/TestNoExceptions.java (from rev 7423, branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/optimizers/TestASTOptimizer500s.java)
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/TestNoExceptions.java (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/TestNoExceptions.java 2013-10-01 20:14:59 UTC (rev 7424)
@@ -0,0 +1,272 @@
+/**
+
+Copyright (C) SYSTAP, LLC 2006-2013. All rights reserved.
+
+Contact:
+ SYSTAP, LLC
+ 4501 Tower Road
+ Greensboro, NC 27410
+ lic...@bi...
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; version 2 of the License.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+/*
+ * Created on Oct 1, 2013
+ */
+
+package com.bigdata.rdf.sail;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedHashSet;
+import java.util.LinkedList;
+import java.util.Properties;
+
+import org.apache.commons.io.IOUtils;
+import org.openrdf.model.ValueFactory;
+import org.openrdf.model.impl.URIImpl;
+import org.openrdf.model.vocabulary.RDF;
+import org.openrdf.model.vocabulary.RDFS;
+import org.openrdf.query.BindingSet;
+import org.openrdf.query.MalformedQueryException;
+import org.openrdf.query.QueryEvaluationException;
+import org.openrdf.query.QueryLanguage;
+import org.openrdf.query.TupleQuery;
+import org.openrdf.query.TupleQueryResult;
+import org.openrdf.query.algebra.StatementPattern.Scope;
+import org.openrdf.query.algebra.evaluation.QueryBindingSet;
+import org.openrdf.repository.RepositoryConnection;
+import org.openrdf.repository.RepositoryException;
+import org.openrdf.repository.sail.SailRepository;
+import org.openrdf.rio.RDFHandlerException;
+import org.openrdf.rio.RDFParseException;
+import org.openrdf.sail.memory.MemoryStore;
+
+import com.bigdata.bop.BOpUtility;
+import com.bigdata.bop.IBindingSet;
+import com.bigdata.bop.IVariable;
+import com.bigdata.bop.Var;
+import com.bigdata.bop.bindingSet.EmptyBindingSet;
+import com.bigdata.rdf.axioms.NoAxioms;
+import com.bigdata.rdf.internal.IV;
+import com.bigdata.rdf.sail.sparql.Bigdata2ASTSPARQLParser;
+import com.bigdata.rdf.sail.sparql.TestSubqueryPatterns;
+import com.bigdata.rdf.sail.sparql.ast.ParseException;
+import com.bigdata.rdf.sail.sparql.ast.TokenMgrError;
+import com.bigdata.rdf.sparql.ast.ASTContainer;
+import com.bigdata.rdf.sparql.ast.AbstractASTEvaluationTestCase;
+import com.bigdata.rdf.sparql.ast.ConstantNode;
+import com.bigdata.rdf.sparql.ast.IQueryNode;
+import com.bigdata.rdf.sparql.ast.JoinGroupNode;
+import com.bigdata.rdf.sparql.ast.NamedSubqueriesNode;
+import com.bigdata.rdf.sparql.ast.NamedSubqueryInclude;
+import com.bigdata.rdf.sparql.ast.NamedSubqueryRoot;
+import com.bigdata.rdf.sparql.ast.ProjectionNode;
+import com.bigdata.rdf.sparql.ast.QueryRoot;
+import com.bigdata.rdf.sparql.ast.QueryType;
+import com.bigdata.rdf.sparql.ast.StatementPatternNode;
+import com.bigdata.rdf.sparql.ast.StaticAnalysis;
+import com.bigdata.rdf.sparql.ast.SubqueryRoot;
+import com.bigdata.rdf.sparql.ast.ValueExpressionNode;
+import com.bigdata.rdf.sparql.ast.VarNode;
+import com.bigdata.rdf.sparql.ast.eval.AST2BOpContext;
+import com.bigdata.rdf.sparql.ast.optimizers.DefaultOptimizerList;
+import com.bigdata.rdf.sparql.ast.optimizers.IASTOptimizer;
+import com.bigdata.rdf.vocab.NoVocabulary;
+import com.bigdata.rdf.vocab.decls.FOAFVocabularyDecl;
+
+/**
+ * This test suite is for trac items where the failure mode is a 500 error caused
+ * by a software error, often in the static optimizer.
+ *
+ * The tests each consist of a test query in a file in this package.
+ * The typical test succeeds if the optimizers run on this query without a disaster.
+ * This test suite does NOT have either of the following objectives:
+ * - that the static optimizer is correct in the sense that the optimized query has the same meaning as the original query
+ * or
+ * - an optimizer in the sense that the optimized query is likely to be faster than the original query.
+ *
+ * The very limited goal is that no uncaught exceptions are thrown!
+ *
+ */
+public class TestNoExceptions extends
+ QuadsTestCase {
+
+ /**
+ *
+ */
+ public TestNoExceptions() {
+ }
+
+ /**
+ * @param name
+ */
+ public TestNoExceptions(String name) {
+ super(name);
+ }
+
+ public AbstractBigdataSailTestCase getOurDelegate() {
+
+ if (getDelegate() == null) {
+
+ String testClass = System.getProperty("testClass");
+ if (testClass != null) {
+ return super.getOurDelegate();
+
+ }
+ setDelegate(new com.bigdata.rdf.sail.TestBigdataSailWithQuads());
+ }
+ return (AbstractBigdataSailTestCase) super.getDelegate();
+ }
+
+ /**
+ * Please set your database properties here, except for your journal file,
+ * please DO NOT SPECIFY A JOURNAL FILE.
+ */
+ @Override
+ public Properties getProperties() {
+
+ final Properties props = super.getProperties();
+
+ /*
+ * For example, here is a set of five properties that turns off
+ * inference, truth maintenance, and the free text index.
+ */
+ props.setProperty(BigdataSail.Options.AXIOMS_CLASS,
+ NoAxioms.class.getName());
+ props.setProperty(BigdataSail.Options.VOCABULARY_CLASS,
+ NoVocabulary.class.getName());
+ props.setProperty(BigdataSail.Options.TRUTH_MAINTENANCE, "false");
+ props.setProperty(BigdataSail.Options.JUSTIFY, "false");
+// props.setProperty(BigdataSail.Options.INLINE_DATE_TIMES, "true");
+// props.setProperty(BigdataSail.Options.ISOLATABLE_INDICES, "true");
+// props.setProperty(BigdataSail.Options.EXACT_SIZE, "true");
+// props.setProperty(BigdataSail.Options.ALLOW_SESAME_QUERY_EVALUATION,
+// "false");
+ props.setProperty(BigdataSail.Options.STATEMENT_IDENTIFIERS, "false");
+
+ return props;
+
+ }
+ /**
+ * Unit test for WITH {subquery} AS "name" and INCLUDE. The WITH must be in
+ * the top-level query.
+ *
+ * This is specifically for Trac 746 which crashed out during optimize.
+ * So the test simply runs that far, and does not verify anything
+ * other than the ability to optimize without an exception
+ * @throws IOException
+ */
+ public void test_namedSubquery746() throws Exception,
+ TokenMgrError, ParseException, IOException {
+ optimizeQuery("ticket746");
+
+ }
+
+/**
+ * <pre>
+SELECT *
+{ { SELECT * { ?s ?p ?o } LIMIT 1 }
+ FILTER ( ?s = <eg:a> )
+}
+ </pre>
+ * @throws MalformedQueryException
+ * @throws TokenMgrError
+ * @throws ParseException
+ * @throws IOException
+ */
+ public void test_filterSubselect737() throws Exception,
+ TokenMgrError, ParseException, IOException {
+ optimizeQuery("filterSubselect737");
+
+ }
+
+
+/**
+ * <pre>
+SELECT *
+WHERE {
+
+ { FILTER ( false ) }
+ UNION
+ {
+ { SELECT ?Subject_A
+ WHERE {
+ { SELECT $j__5 ?Subject_A
+ {
+ } ORDER BY $j__5
+ }
+ } GROUP BY ?Subject_A
+ }
+ }
+ OPTIONAL {
+ { SELECT ?Subject_A
+ WHERE {
+ { SELECT $j__8 ?Subject_A
+ {
+
+ } ORDER BY $j_8
+ }
+ } GROUP BY ?Subject_A
+ }
+ }
+}
+ </pre>
+ * @throws MalformedQueryException
+ * @throws TokenMgrError
+ * @throws ParseException
+ * @throws IOException
+ */
+ public void test_nestedSubselectsWithUnion737() throws Exception,
+ TokenMgrError, ParseException, IOException {
+ optimizeQuery("nestedSubselectsWithUnion737");
+
+ }
+
+ void optimizeQuery(final String queryfile) throws Exception {
+ final String sparql = IOUtils.toString(getClass().getResourceAsStream(queryfile+".rq"));
+ // try with Bigdata:
+ final BigdataSail sail = getSail();
+ try {
+ executeQuery(new BigdataSailRepository(sail),sparql);
+ } finally {
+ sail.__tearDownUnitTest();
+ }
+
+ }
+
+ private void executeQuery(final SailRepository repo, final String query)
+ throws RepositoryException, MalformedQueryException,
+ QueryEvaluationException, RDFParseException, IOException,
+ RDFHandlerException {
+ try {
+ repo.initialize();
+ final RepositoryConnection conn = repo.getConnection();
+ conn.setAutoCommit(false);
+ try {
+ final ValueFactory vf = conn.getValueFactory();
+ conn.commit();
+ TupleQuery tq = conn.prepareTupleQuery(QueryLanguage.SPARQL, query);
+ TupleQueryResult tqr = tq.evaluate();
+ tqr.close();
+ } finally {
+ conn.close();
+ }
+ } finally {
+ repo.shutDown();
+ }
+ }
+
+}
Copied: branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/filterSubselect737.rq (from rev 7423, branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/optimizers/filterSubselect737.rq)
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/filterSubselect737.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/filterSubselect737.rq 2013-10-01 20:14:59 UTC (rev 7424)
@@ -0,0 +1,4 @@
+SELECT *
+{ { SELECT * { ?s ?p ?o } LIMIT 1 }
+ FILTER ( ?s = <eg:a> )
+}
\ No newline at end of file
Copied: branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/nestedSubselectsWithUnion737.rq (from rev 7423, branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/optimizers/nestedSubselectsWithUnion737.rq)
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/nestedSubselectsWithUnion737.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/nestedSubselectsWithUnion737.rq 2013-10-01 20:14:59 UTC (rev 7424)
@@ -0,0 +1,27 @@
+SELECT *
+WHERE {
+
+ { FILTER ( false ) }
+ UNION
+ {
+ { SELECT ?Subject_A
+ WHERE {
+ { SELECT $j__5 ?Subject_A
+ {
+ } ORDER BY $j__5
+ }
+ } GROUP BY ?Subject_A
+ }
+ }
+ OPTIONAL {
+ { SELECT ?Subject_A
+ WHERE {
+ { SELECT $j__8 ?Subject_A
+ {
+
+ } ORDER BY $j_8
+ }
+ } GROUP BY ?Subject_A
+ }
+ }
+}
\ No newline at end of file
Copied: branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/ticket746.rq (from rev 7423, branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/optimizers/ticket746.rq)
===================================================================
--- branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/ticket746.rq (rev 0)
+++ branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/ticket746.rq 2013-10-01 20:14:59 UTC (rev 7424)
@@ -0,0 +1,35 @@
+base <http://example.org/>
+prefix sys: </bdm/api/kbobject/sys:>
+prefix base: </bdm/api/kbobject/base:>
+prefix syapse: </graph/syapse#>
+prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+
+SELECT *
+
+WITH {
+SELECT *
+
+WHERE {
+
+ OPTIONAL {
+ base:disease syapse:hasLiteralProperty $j2 .
+ ?Sample_A $j2 ?j1
+ }
+ OPTIONAL {
+ base:species syapse:hasLiteralProperty $j4 .
+ ?Sample_A $j4 ?j3
+ }
+ OPTIONAL {
+ ?Sample_A sys:name ?j5
+ }
+ ?Sample_A rdf:type / rdfs:subClassOf * base:MammalianCellLineSample
+}
+
+} AS %__UserQuery
+
+WHERE {
+
+INCLUDE %__UserQuery
+
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|