diff --git a/bigdata-core/bigdata/src/java/com/bigdata/bop/join/JVMHashIndex.java b/bigdata-core/bigdata/src/java/com/bigdata/bop/join/JVMHashIndex.java index eca49c36ff..0667c77b2f 100644 --- a/bigdata-core/bigdata/src/java/com/bigdata/bop/join/JVMHashIndex.java +++ b/bigdata-core/bigdata/src/java/com/bigdata/bop/join/JVMHashIndex.java @@ -359,6 +359,32 @@ public boolean addDistinct(final IBindingSet solution) { } + /** + * @param bs the binding set to check + * @return if the bucket contains the binding set, false otherwise + */ + public boolean contains(final IBindingSet bs) { + + if (solutions.isEmpty()) { + return false; + } + + final Iterator itr = solutions.iterator(); + + while (itr.hasNext()) { + + final SolutionHit aSolution = itr.next(); + + if (aSolution.solution.equals(bs)) { + return true; + } + + } + + return false; // not found + + } + @Override final public Iterator iterator() { diff --git a/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/TestAll.java b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/TestAll.java index 1857e87a7f..ebaa980611 100644 --- a/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/TestAll.java +++ b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/TestAll.java @@ -161,7 +161,9 @@ public static Test suite() // an early exception when accessing named graphs in triples mode suite.addTest(TestTicket1105.suite()); - if (QueryHints.DEFAULT_REIFICATION_DONE_RIGHT) { + suite.addTestSuite(TestBrokenDatetimeParsing.class); + + if (QueryHints.DEFAULT_REIFICATION_DONE_RIGHT) { /* * Test suite for the SPARQL extension for "reification done right". diff --git a/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/TestBrokenDatetimeParsing.java b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/TestBrokenDatetimeParsing.java new file mode 100644 index 0000000000..6fab0170d6 --- /dev/null +++ b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/TestBrokenDatetimeParsing.java @@ -0,0 +1,57 @@ +package com.bigdata.rdf.sparql.ast.eval; + + +/** + * Test case fot date time parsing in queries when specifying dates containing a numerical time zone spec. + * We suspected a bug, but there actually was only a problem in missing URL encoding for the '+' sign when + * executing the query with curl. Checking in the test case nevertheless to increase confidence. + * + * See https://github.com/blazegraph/database/issues/107 + * + * @author schmdtm + */ +public class TestBrokenDatetimeParsing extends AbstractDataDrivenSPARQLTestCase { + + public TestBrokenDatetimeParsing() { + } + + /** + * Data: + * "2012-01-28T00:00:00.000Z"^^ . + * "2012-01-28T00:00:00.000+00:00"^^ . + * "2012-01-30T00:00:00.000Z"^^ . + * "2012-01-30T00:00:00.000+00:00"^^ . + * + * Query: + * PREFIX xsd: + * SELECT * WHERE { + * ?s ?o + * FILTER(?o > "2012-01-29T00:00:00.000+00:00"^^xsd:dateTime) + * } + * + * => expected to select s2a and s2b (which point to the same timestamp) + */ + public void test_datetime_roundtripping_with_numerical_time_zone() throws Exception { + + new TestHelper( + "datetime-roundtripping01",// testURI, + "datetime-roundtripping01.rq",// queryFileURL + "datetime-roundtripping.ttl",// dataFileURL + "datetime-roundtripping.srx"// resultFileURL + ).runTest(); + } + + /** + * Variant of the test case with query containing the date specified in Zulu format, using 'Z'. + * Note that this version used to work all the time, just added to avoid regressions. + */ + public void test_datetime_roundtripping_with_zulu_time_zone() throws Exception { + + new TestHelper( + "datetime-roundtripping02",// testURI, + "datetime-roundtripping02.rq",// queryFileURL + "datetime-roundtripping.ttl",// dataFileURL + "datetime-roundtripping.srx"// resultFileURL + ).runTest(); + } +} diff --git a/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/TestPipelinedHashJoin.java b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/TestPipelinedHashJoin.java index d468447527..836e45f383 100644 --- a/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/TestPipelinedHashJoin.java +++ b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/TestPipelinedHashJoin.java @@ -1010,8 +1010,267 @@ public void testPipelinedHashJoinNotExistsMultiplicityAnalyticMode() throws Exce assertPipelinedPlanOrNot(queryPlan, astContainer, true, true); - } - + } + + /** + * Bug reporting MINUS pipelined hash join being broken, test case for analytic mode. + * + * See https://github.com/blazegraph/database/issues/107 + */ + public void testPipelinedHashJoinMinusBug01aAnalyticMode() throws Exception { + + final ASTContainer astContainer = new TestHelper( + "pipelined-hashjoin-minusbug01a-analytic",// testURI + "pipelined-hashjoin-minusbug01ab-analytic.rq", // queryURI + "pipelined-hashjoin-minusbug01a.nt", // dataUiI + "pipelined-hashjoin-minusbug01a.srx" // resultURI + ).runTest(); + + final PipelineOp queryPlan = astContainer.getQueryPlan(); + + assertPipelinedPlanOrNot(queryPlan, astContainer, true, true); + } + + /** + * Bug reporting MINUS pipelined hash join being broken, test case for non-analytic mode. + * + * See https://github.com/blazegraph/database/issues/107 + */ + public void testPipelinedHashJoinMinusBug01aNonAnalyticMode() throws Exception { + + final ASTContainer astContainer = new TestHelper( + "pipelined-hashjoin-minusbug01a-nonanalytic",// testURI + "pipelined-hashjoin-minusbug01ab-nonanalytic.rq", // queryURI + "pipelined-hashjoin-minusbug01a.nt", // dataURI + "pipelined-hashjoin-minusbug01a.srx" // resultURI + ).runTest(); + + final PipelineOp queryPlan = astContainer.getQueryPlan(); + + assertPipelinedPlanOrNot(queryPlan, astContainer, true, false); + } + + /** + * Bug reporting MINUS pipelined hash join being broken, just making sure that the non-pipelined version + * for the test case (i.e., query without LIMIT) is working as expected in analytic mode. + * + * See https://github.com/blazegraph/database/issues/107 + */ + public void testPipelinedHashJoinDisabledMinusBug01aAnalyticMode() throws Exception { + + final ASTContainer astContainer = new TestHelper( + "pipelined-hashjoin-disabled-minusbug01ab-analytic",// testURI + "pipelined-hashjoin-disabled-minusbug01ab-analytic.rq", // queryURI + "pipelined-hashjoin-minusbug01a.nt", // dataURI + "pipelined-hashjoin-minusbug01a.srx" // resultURI + ).runTest(); + + final PipelineOp queryPlan = astContainer.getQueryPlan(); + + assertPipelinedPlanOrNot(queryPlan, astContainer, false, true); + } + + /** + * Bug reporting MINUS pipelined hash join being broken, just making sure that the non-pipelined version + * for the test case (i.e., query without LIMIT) is working as expected in non-analytic mode. + * + * See https://github.com/blazegraph/database/issues/107 + */ + public void testPipelinedHashJoinDisabledMinusBug01aNonAnalyticMode() throws Exception { + + final ASTContainer astContainer = new TestHelper( + "pipelined-hashjoin-disabled-minusbug01a-nonanalytic",// testURI + "pipelined-hashjoin-disabled-minusbug01ab-nonanalytic.rq", // queryURI + "pipelined-hashjoin-minusbug01a.nt", // dataURI + "pipelined-hashjoin-minusbug01a.srx" // resultURI + ).runTest(); + + final PipelineOp queryPlan = astContainer.getQueryPlan(); + + assertPipelinedPlanOrNot(queryPlan, astContainer, false, false); + + } + + + /** + * Bug reporting MINUS pipelined hash join being broken, test case for analytic mode. + * Variant of 01a that is a little more challenging, as it contains more solutions and duplicates. + * + * See https://github.com/blazegraph/database/issues/107 + */ + public void testPipelinedHashJoinMinusBug01bAnalyticMode() throws Exception { + + final ASTContainer astContainer = new TestHelper( + "pipelined-hashjoin-minusbug01b-analytic",// testURI + "pipelined-hashjoin-minusbug01ab-analytic.rq", // queryURI + "pipelined-hashjoin-minusbug01b.nt", // dataUiI + "pipelined-hashjoin-minusbug01b.srx" // resultURI + ).runTest(); + + final PipelineOp queryPlan = astContainer.getQueryPlan(); + + assertPipelinedPlanOrNot(queryPlan, astContainer, true, true); + } + + /** + * Bug reporting MINUS pipelined hash join being broken, test case for non-analytic mode. + * Variant of 01a that is a little more challenging, as it contains more solutions and duplicates. + * + * See https://github.com/blazegraph/database/issues/107 + */ + public void testPipelinedHashJoinMinusBug01bNonAnalyticMode() throws Exception { + + final ASTContainer astContainer = new TestHelper( + "pipelined-hashjoin-minusbug01b-nonanalytic",// testURI + "pipelined-hashjoin-minusbug01ab-nonanalytic.rq", // queryURI + "pipelined-hashjoin-minusbug01b.nt", // dataURI + "pipelined-hashjoin-minusbug01b.srx" // resultURI + ).runTest(); + + final PipelineOp queryPlan = astContainer.getQueryPlan(); + + assertPipelinedPlanOrNot(queryPlan, astContainer, true, false); + } + + /** + * Bug reporting MINUS pipelined hash join being broken, just making sure that the non-pipelined version + * for the test case (i.e., query without LIMIT) is working as expected in analytic mode. + * + * Variant of 01a that is a little more challenging, as it contains more solutions and duplicates. + * + * See https://github.com/blazegraph/database/issues/107 + */ + public void testPipelinedHashJoinDisabledMinusBug01bAnalyticMode() throws Exception { + + final ASTContainer astContainer = new TestHelper( + "pipelined-hashjoin-disabled-minusbug01b-analytic",// testURI + "pipelined-hashjoin-disabled-minusbug01ab-analytic.rq", // queryURI + "pipelined-hashjoin-minusbug01b.nt", // dataURI + "pipelined-hashjoin-minusbug01b.srx" // resultURI + ).runTest(); + + final PipelineOp queryPlan = astContainer.getQueryPlan(); + + assertPipelinedPlanOrNot(queryPlan, astContainer, false, true); + } + + /** + * Bug reporting MINUS pipelined hash join being broken, just making sure that the non-pipelined version + * for the test case (i.e., query without LIMIT) is working as expected in non-analytic mode. + * + * Variant of 01a that is a little more challenging, as it contains more solutions and duplicates. + * + * See https://github.com/blazegraph/database/issues/107 + */ + public void testPipelinedHashJoinDisabledMinusBug01bNonAnalyticMode() throws Exception { + + final ASTContainer astContainer = new TestHelper( + "pipelined-hashjoin-disabled-minusbug01b-nonanalytic",// testURI + "pipelined-hashjoin-disabled-minusbug01ab-nonanalytic.rq", // queryURI + "pipelined-hashjoin-minusbug01b.nt", // dataURI + "pipelined-hashjoin-minusbug01b.srx" // resultURI + ).runTest(); + + final PipelineOp queryPlan = astContainer.getQueryPlan(); + + assertPipelinedPlanOrNot(queryPlan, astContainer, false, false); + + } + + /** + * Bug reporting MINUS pipelined hash join being broken, test case for analytic mode. + * + * See https://github.com/blazegraph/database/issues/107 + */ + public void testPipelinedHashJoinMinusBug02AnalyticMode() throws Exception { + + final ASTContainer astContainer = new TestHelper( + "pipelined-hashjoin-minusbug02-analytic",// testURI + "pipelined-hashjoin-minusbug02-analytic.rq", // queryURI + "pipelined-hashjoin-minusbug02.nt", // dataUiI + "pipelined-hashjoin-minusbug02.srx" // resultURI + ).runTest(); + + final PipelineOp queryPlan = astContainer.getQueryPlan(); + + assertPipelinedPlanOrNot(queryPlan, astContainer, true, true); + } + + /** + * Bug reporting MINUS pipelined hash join being broken, test case for non-analytic mode. + * + * Variant of the 01* test cases, where we have a join inducing duplicates across chunks. This aims at + * testing code paths that skip subquery re-evaluation for binding sets that have been evaluated in + * previous passes. + * + * See https://github.com/blazegraph/database/issues/107 + */ + public void testPipelinedHashJoinMinusBug02NonAnalyticMode() throws Exception { + + final ASTContainer astContainer = new TestHelper( + "pipelined-hashjoin-minusbug02-nonanalytic",// testURI + "pipelined-hashjoin-minusbug02-nonanalytic.rq", // queryURI + "pipelined-hashjoin-minusbug02.nt", // dataURI + "pipelined-hashjoin-minusbug02.srx" // resultURI + ).runTest(); + + final PipelineOp queryPlan = astContainer.getQueryPlan(); + + assertPipelinedPlanOrNot(queryPlan, astContainer, true, false); + } + + /** + * Bug reporting MINUS pipelined hash join being broken, just making sure that the non-pipelined version + * for the test case (i.e., query without LIMIT) is working as expected in analytic mode. + * + * Variant of the 01* test cases, where we have a join inducing duplicates across chunks. This aims at + * testing code paths that skip subquery re-evaluation for binding sets that have been evaluated in + * previous passes. + * + * See https://github.com/blazegraph/database/issues/107 + */ + public void testPipelinedHashJoinDisabledMinusBug02AnalyticMode() throws Exception { + + final ASTContainer astContainer = new TestHelper( + "pipelined-hashjoin-disabled-minusbug02-analytic",// testURI + "pipelined-hashjoin-disabled-minusbug02-analytic.rq", // queryURI + "pipelined-hashjoin-minusbug02.nt", // dataURI + "pipelined-hashjoin-minusbug02.srx" // resultURI + ).runTest(); + + final PipelineOp queryPlan = astContainer.getQueryPlan(); + + assertPipelinedPlanOrNot(queryPlan, astContainer, false, true); + } + + /** + * Bug reporting MINUS pipelined hash join being broken, just making sure that the non-pipelined version + * for the test case (i.e., query without LIMIT) is working as expected in non-analytic mode. + * + * Variant of the 01* test cases, where we have a join inducing duplicates across chunks. This aims at + * testing code paths that skip subquery re-evaluation for binding sets that have been evaluated in + * previous passes. + * + * See https://github.com/blazegraph/database/issues/107 + */ + public void testPipelinedHashJoinDisabledMinusBug02NonAnalyticMode() throws Exception { + + final ASTContainer astContainer = new TestHelper( + "pipelined-hashjoin-disabled-minusbug02-nonanalytic",// testURI + "pipelined-hashjoin-disabled-minusbug02-nonanalytic.rq", // queryURI + "pipelined-hashjoin-minusbug02.nt", // dataURI + "pipelined-hashjoin-minusbug02.srx" // resultURI + ).runTest(); + + final PipelineOp queryPlan = astContainer.getQueryPlan(); + + assertPipelinedPlanOrNot(queryPlan, astContainer, false, false); + + } + + + + /** * Asserts that a PipelinedHashIndexAndSolutionSetOp is contained in the * query plan if contains equals true, otherwise that it is diff --git a/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/datetime-roundtripping.srx b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/datetime-roundtripping.srx new file mode 100644 index 0000000000..76bdc721a1 --- /dev/null +++ b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/datetime-roundtripping.srx @@ -0,0 +1,28 @@ + + + + + + + + + + http://s2a + + + 2012-01-30T00:00:00.000Z + + + + + http://s2b + + + 2012-01-30T00:00:00.000Z + + + + diff --git a/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/datetime-roundtripping.ttl b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/datetime-roundtripping.ttl new file mode 100644 index 0000000000..5584f0e414 --- /dev/null +++ b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/datetime-roundtripping.ttl @@ -0,0 +1,5 @@ + "2012-01-28T00:00:00.000Z"^^ . + "2012-01-28T00:00:00.000+00:00"^^ . + "2012-01-30T00:00:00.000Z"^^ . + "2012-01-30T00:00:00.000+00:00"^^ . + diff --git a/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/datetime-roundtripping01.rq b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/datetime-roundtripping01.rq new file mode 100644 index 0000000000..9b2b3659d6 --- /dev/null +++ b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/datetime-roundtripping01.rq @@ -0,0 +1,5 @@ +PREFIX xsd: +SELECT * WHERE { + ?s ?o + FILTER(?o > "2012-01-29T00:00:00.000+00:00"^^xsd:dateTime) +} diff --git a/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/datetime-roundtripping02.rq b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/datetime-roundtripping02.rq new file mode 100644 index 0000000000..2753974e1a --- /dev/null +++ b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/datetime-roundtripping02.rq @@ -0,0 +1,5 @@ +PREFIX xsd: +SELECT * WHERE { + ?s ?o + FILTER(?o > "2012-01-29T00:00:00.000Z"^^xsd:dateTime) +} diff --git a/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-disabled-minusbug01ab-analytic.rq b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-disabled-minusbug01ab-analytic.rq new file mode 100644 index 0000000000..2ecb13ebc0 --- /dev/null +++ b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-disabled-minusbug01ab-analytic.rq @@ -0,0 +1,10 @@ +PREFIX hint: +SELECT DISTINCT ?item WHERE { + hint:Query hint:optimizer "None". + hint:Query hint:analytic "true" . + ?x ?title . + BIND(IRI(CONCAT("http://www.wikidata.org/entity/", ?title)) AS ?item) + MINUS { + ?item + } +} diff --git a/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-disabled-minusbug01ab-nonanalytic.rq b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-disabled-minusbug01ab-nonanalytic.rq new file mode 100644 index 0000000000..f399670f4f --- /dev/null +++ b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-disabled-minusbug01ab-nonanalytic.rq @@ -0,0 +1,10 @@ +PREFIX hint: +SELECT DISTINCT ?item WHERE { + hint:Query hint:optimizer "None". + hint:Query hint:analytic "false" . + ?x ?title . + BIND(IRI(CONCAT("http://www.wikidata.org/entity/", ?title)) AS ?item) + MINUS { + ?item + } +} diff --git a/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-disabled-minusbug02-analytic.rq b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-disabled-minusbug02-analytic.rq new file mode 100644 index 0000000000..c7852ee5d4 --- /dev/null +++ b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-disabled-minusbug02-analytic.rq @@ -0,0 +1,11 @@ +PREFIX hint: +SELECT DISTINCT ?item WHERE { + hint:Query hint:optimizer "None". + hint:Query hint:analytic "true" . + ?x ?title . + ?x2 ?title2 . + BIND(IRI(CONCAT("http://www.wikidata.org/entity/", ?title)) AS ?item) + MINUS { + ?item + } +} diff --git a/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-disabled-minusbug02-nonanalytic.rq b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-disabled-minusbug02-nonanalytic.rq new file mode 100644 index 0000000000..6591dfdab8 --- /dev/null +++ b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-disabled-minusbug02-nonanalytic.rq @@ -0,0 +1,11 @@ +PREFIX hint: +SELECT DISTINCT ?item WHERE { + hint:Query hint:optimizer "None". + hint:Query hint:analytic "false" . + ?x ?title . + ?x2 ?title2 . + BIND(IRI(CONCAT("http://www.wikidata.org/entity/", ?title)) AS ?item) + MINUS { + ?item + } +} diff --git a/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-minusbug01a.nt b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-minusbug01a.nt new file mode 100644 index 0000000000..da87cdf126 --- /dev/null +++ b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-minusbug01a.nt @@ -0,0 +1,400 @@ + "Q24247028" . + "Q24247032" . + "Q24247033" . + "Q24247034" . + "Q24247037" . + "Q24247045" . + "Q24247047" . + "Q24247048" . + "Q24247052" . + "Q24247053" . + "Q24247054" . + "Q24247056" . + "Q24247057" . + "Q24247059" . + "Q24247060" . + "Q24247062" . + "Q24247064" . + "Q24247065" . + "Q24247068" . + "Q24247069" . + "Q24247070" . + "Q24247071" . + "Q24247074" . + "Q24247076" . + "Q24247088" . + "Q24247089" . + "Q24247090" . + "Q24247091" . + "Q24247092" . + "Q24247100" . + "Q24247105" . + "Q24247107" . + "Q24247108" . + "Q24247110" . + "Q24247111" . + "Q24247117" . + "Q24247125" . + "Q24247174" . + "Q24247176" . + "Q24247178" . + "Q24247186" . + "Q24248173" . + "Q24255215" . + "Q24255260" . + "Q24261085" . + "Q24261086" . + "Q24261087" . + "Q24261088" . + "Q24261090" . + "Q24261091" . + "Q24261092" . + "Q24261093" . + "Q24261096" . + "Q24261097" . + "Q24261098" . + "Q24261099" . + "Q24261100" . + "Q24261101" . + "Q24261102" . + "Q24261103" . + "Q24261104" . + "Q24261105" . + "Q24261106" . + "Q24261107" . + "Q24261109" . + "Q24261110" . + "Q24261111" . + "Q24261113" . + "Q24261115" . + "Q24261116" . + "Q24261117" . + "Q24261118" . + "Q24261119" . + "Q24261120" . + "Q24261121" . + "Q24261122" . + "Q24261123" . + "Q24261124" . + "Q24261125" . + "Q24261126" . + "Q24261127" . + "Q24261128" . + "Q24261129" . + "Q24261130" . + "Q24261131" . + "Q24261132" . + "Q24261133" . + "Q24261134" . + "Q24261135" . + "Q24261136" . + "Q24261137" . + "Q24261139" . + "Q24261140" . + "Q24261143" . + "Q24261144" . + "Q24261145" . + "Q24261147" . + "Q24261149" . + "Q24261150" . + "Q24261151" . + "Q24261273" . + "Q24261274" . + "Q24261277" . + "Q24261278" . + "Q24261279" . + "Q24261281" . + "Q24261282" . + "Q24261284" . + "Q24261288" . + "Q24261290" . + "Q24261297" . + "Q24261299" . + "Q24261301" . + "Q24261302" . + "Q24261303" . + "Q24261304" . + "Q24261305" . + "Q24261306" . + "Q24261308" . + "Q24261309" . + "Q24261313" . + "Q24261314" . + "Q24261315" . + "Q24261321" . + "Q24261322" . + "Q24261323" . + "Q24261324" . + "Q24261325" . + "Q24261326" . + "Q24261327" . + "Q24261328" . + "Q24261329" . + "Q24261330" . + "Q24261331" . + "Q24261332" . + "Q24261333" . + "Q24261334" . + "Q24261335" . + "Q24261336" . + "Q24261340" . + "Q24261341" . + "Q24261342" . + "Q24261343" . + "Q24261344" . + "Q24261345" . + "Q24261346" . + "Q24261347" . + "Q24261348" . + "Q24261351" . + "Q24261354" . + "Q24261355" . + "Q24261356" . + "Q24261358" . + "Q24261359" . + "Q24261360" . + "Q24261361" . + "Q24261363" . + "Q24261364" . + "Q24261365" . + "Q24261366" . + "Q24261367" . + "Q24261371" . + "Q24261372" . + "Q24261373" . + "Q24261375" . + "Q24261376" . + "Q24261377" . + "Q24261380" . + "Q24261381" . + "Q24261382" . + "Q24261383" . + "Q24261384" . + "Q24261385" . + "Q24261386" . + "Q24261387" . + "Q24261389" . + "Q24261390" . + "Q24261391" . + "Q24261392" . + "Q24261393" . + "Q24261394" . + "Q24261395" . + "Q24261396" . + "Q24261397" . + "Q24261398" . + "Q24261399" . + "Q24261400" . + "Q24261401" . + "Q24261402" . + "Q24261403" . + "Q24261404" . + "Q24261405" . + "Q24261407" . + "Q24261408" . + "Q24261409" . + "Q24261410" . + "Q24261411" . + "Q24261412" . + "Q24261413" . + "Q24261414" . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . diff --git a/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-minusbug01a.srx b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-minusbug01a.srx new file mode 100644 index 0000000000..dfe172e873 --- /dev/null +++ b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-minusbug01a.srx @@ -0,0 +1,16 @@ + + + + + + + + + http://www.wikidata.org/entity/Q24261414 + + + + diff --git a/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-minusbug01ab-analytic.rq b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-minusbug01ab-analytic.rq new file mode 100644 index 0000000000..7138f5387d --- /dev/null +++ b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-minusbug01ab-analytic.rq @@ -0,0 +1,10 @@ +PREFIX hint: +SELECT DISTINCT ?item WHERE { + hint:Query hint:optimizer "None". + hint:Query hint:analytic "true" . + ?x ?title . + BIND(IRI(CONCAT("http://www.wikidata.org/entity/", ?title)) AS ?item) + MINUS { + ?item + } +} LIMIT 1000 diff --git a/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-minusbug01ab-nonanalytic.rq b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-minusbug01ab-nonanalytic.rq new file mode 100644 index 0000000000..d64512ed0d --- /dev/null +++ b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-minusbug01ab-nonanalytic.rq @@ -0,0 +1,10 @@ +PREFIX hint: +SELECT DISTINCT ?item WHERE { + hint:Query hint:optimizer "None". + hint:Query hint:analytic "false" . + ?x ?title . + BIND(IRI(CONCAT("http://www.wikidata.org/entity/", ?title)) AS ?item) + MINUS { + ?item + } +} LIMIT 1000 diff --git a/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-minusbug01b.nt b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-minusbug01b.nt new file mode 100644 index 0000000000..ae4a7a02b0 --- /dev/null +++ b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-minusbug01b.nt @@ -0,0 +1,403 @@ + "Q24247028" . + "Q24247032" . + "Q24247033" . + "Q24247034" . + "Q24247037" . + "Q24247045" . + "Q24247047" . + "Q24247048" . + "Q24247052" . + "Q24247053" . + "Q24247054" . + "Q24247056" . + "Q24247057" . + "Q24247059" . + "Q24247060" . + "Q24247062" . + "Q24247064" . + "Q24247065" . + "Q24247068" . + "Q24247069" . + "Q24247070" . + "Q24247071" . + "Q24247074" . + "Q24247076" . + "Q24247088" . + "Q24247089" . + "Q24247090" . + "Q24247091" . + "Q24247092" . + "Q24247100" . + "Q24247105" . + "Q24247107" . + "Q24247108" . + "Q24247110" . + "Q24247111" . + "Q24247117" . + "Q24247125" . + "Q24247174" . + "Q24247176" . + "Q24247178" . + "Q24247186" . + "Q24248173" . + "Q24255215" . + "Q24255260" . + "Q24261085" . + "Q24261086" . + "Q24261087" . + "Q24261088" . + "Q24261090" . + "Q24261091" . + "Q24261092" . + "Q24261093" . + "Q24261096" . + "Q24261097" . + "Q24261098" . + "Q24261099" . + "Q24261100" . + "Q24261101" . + "Q24261102" . + "Q24261103" . + "Q24261104" . + "Q24261105" . + "Q24261106" . + "Q24261107" . + "Q24261109" . + "Q24261110" . + "Q24261111" . + "Q24261113" . + "Q24261115" . + "Q24261116" . + "Q24261117" . + "Q24261118" . + "Q24261119" . + "Q24261120" . + "Q24261121" . + "Q24261122" . + "Q24261123" . + "Q24261124" . + "Q24261125" . + "Q24261126" . + "Q24261127" . + "Q24261128" . + "Q24261129" . + "Q24261130" . + "Q24261131" . + "Q24261132" . + "Q24261133" . + "Q24261134" . + "Q24261135" . + "Q24261136" . + "Q24261137" . + "Q24261139" . + "Q24261140" . + "Q24261143" . + "Q24261144" . + "Q24261145" . + "Q24261147" . + "Q24261149" . + "Q24261150" . + "Q24261151" . + "Q24261273" . + "Q24261274" . + "Q24261277" . + "Q24261278" . + "Q24261279" . + "Q24261281" . + "Q24261282" . + "Q24261284" . + "Q24261288" . + "Q24261290" . + "Q24261297" . + "Q24261299" . + "Q24261301" . + "Q24261302" . + "Q24261303" . + "Q24261304" . + "Q24261305" . + "Q24261306" . + "Q24261308" . + "Q24261309" . + "Q24261313" . + "Q24261314" . + "Q24261315" . + "Q24261321" . + "Q24261322" . + "Q24261323" . + "Q24261324" . + "Q24261325" . + "Q24261326" . + "Q24261327" . + "Q24261328" . + "Q24261329" . + "Q24261330" . + "Q24261331" . + "Q24261332" . + "Q24261333" . + "Q24261334" . + "Q24261335" . + "Q24261336" . + "Q24261340" . + "Q24261341" . + "Q24261342" . + "Q24261343" . + "Q24261344" . + "Q24261345" . + "Q24261346" . + "Q24261347" . + "Q24261348" . + "Q24261351" . + "Q24261354" . + "Q24261355" . + "Q24261356" . + "Q24261358" . + "Q24261359" . + "Q24261360" . + "Q24261361" . + "Q24261363" . + "Q24261364" . + "Q24261365" . + "Q24261366" . + "Q24261367" . + "Q24261371" . + "Q24261372" . + "Q24261373" . + "Q24261375" . + "Q24261376" . + "Q24261377" . + "Q24261380" . + "Q24261381" . + "Q24261382" . + "Q24261383" . + "Q24261384" . + "Q24261385" . + "Q24261386" . + "Q24261387" . + "Q24261389" . + "Q24261390" . + "Q24261391" . + "Q24261392" . + "Q24261393" . + "Q24261394" . + "Q24261395" . + "Q24261396" . + "Q24261397" . + "Q24261398" . + "Q24261399" . + "Q24261400" . + "Q24261401" . + "Q24261402" . + "Q24261403" . + "Q24261404" . + "Q24261405" . + "Q24261407" . + "Q24261408" . + "Q24261409" . + "Q24261410" . + "Q24261411" . + "Q24261412" . + "Q24261413" . + "Q24261414" . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . diff --git a/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-minusbug01b.srx b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-minusbug01b.srx new file mode 100644 index 0000000000..a78cff00ab --- /dev/null +++ b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-minusbug01b.srx @@ -0,0 +1,26 @@ + + + + + + + + + http://www.wikidata.org/entity/Q24261414 + + + + + http://www.wikidata.org/entity/Q24247034 + + + + + http://www.wikidata.org/entity/Q24261097 + + + + diff --git a/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-minusbug02-analytic.rq b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-minusbug02-analytic.rq new file mode 100644 index 0000000000..6f12f25da3 --- /dev/null +++ b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-minusbug02-analytic.rq @@ -0,0 +1,11 @@ +PREFIX hint: +SELECT DISTINCT ?item WHERE { + hint:Query hint:optimizer "None". + hint:Query hint:analytic "true" . + ?x ?title . + ?x2 ?title2 . + BIND(IRI(CONCAT("http://www.wikidata.org/entity/", ?title)) AS ?item) + MINUS { + ?item + } +} LIMIT 1000 diff --git a/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-minusbug02-nonanalytic.rq b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-minusbug02-nonanalytic.rq new file mode 100644 index 0000000000..1489cb5c18 --- /dev/null +++ b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-minusbug02-nonanalytic.rq @@ -0,0 +1,11 @@ +PREFIX hint: +SELECT DISTINCT ?item WHERE { + hint:Query hint:optimizer "None". + hint:Query hint:analytic "false" . + ?x ?title . + ?x2 ?title2 . + BIND(IRI(CONCAT("http://www.wikidata.org/entity/", ?title)) AS ?item) + MINUS { + ?item + } +} LIMIT 1000 diff --git a/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-minusbug02.nt b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-minusbug02.nt new file mode 100644 index 0000000000..99985c0264 --- /dev/null +++ b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-minusbug02.nt @@ -0,0 +1,213 @@ + "Q24247028" . + "Q24247032" . + "Q24247033" . + "Q24247034" . + "Q24247037" . + "Q24247045" . + "Q24247047" . + "Q24247048" . + "Q24247052" . + "Q24247053" . + "Q24247054" . + "Q24247056" . + "Q24247057" . + "Q24247059" . + "Q24247060" . + "Q24247062" . + "Q24247064" . + "Q24247065" . + "Q24247068" . + "Q24247069" . + "Q24247070" . + "Q24247071" . + "Q24247074" . + "Q24247076" . + "Q24247088" . + "Q24247089" . + "Q24247090" . + "Q24247091" . + "Q24247092" . + "Q24247100" . + "Q24247105" . + "Q24247107" . + "Q24247108" . + "Q24247110" . + "Q24247111" . + "Q24247117" . + "Q24247125" . + "Q24247174" . + "Q24247176" . + "Q24247178" . + "Q24247186" . + "Q24248173" . + "Q24255215" . + "Q24255260" . + "Q24261085" . + "Q24261086" . + "Q24261087" . + "Q24261088" . + "Q24261090" . + "Q24261091" . + "Q24261092" . + "Q24261093" . + "Q24261096" . + "Q24261097" . + "Q24261098" . + "Q24261099" . + "Q24261100" . + "Q24261101" . + "Q24261102" . + "Q24261103" . + "Q24261104" . + "Q24261105" . + "Q24261106" . + "Q24261107" . + "Q24261109" . + "Q24261110" . + "Q24261111" . + "Q24261113" . + "Q24261115" . + "Q24261116" . + "Q24261117" . + "Q24261118" . + "Q24261119" . + "Q24261120" . + "Q24261121" . + "Q24261122" . + "Q24261123" . + "Q24261124" . + "Q24261125" . + "Q24261126" . + "Q24261127" . + "Q24261128" . + "Q24261129" . + "Q24261130" . + "Q24261131" . + "Q24261132" . + "Q24261133" . + "Q24261134" . + "Q24261135" . + "Q24261136" . + "Q24261137" . + "Q24261139" . + "Q24261140" . + "Q24261143" . + "Q24261144" . + "Q24261145" . + "Q24261147" . + "Q24261149" . + "Q24261150" . + "Q24261151" . + "Q24261273" . + "Q24261274" . + "Q24261277" . + "Q24261278" . + "Q24261414" . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . diff --git a/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-minusbug02.srx b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-minusbug02.srx new file mode 100644 index 0000000000..a78cff00ab --- /dev/null +++ b/bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/pipelined-hashjoin-minusbug02.srx @@ -0,0 +1,26 @@ + + + + + + + + + http://www.wikidata.org/entity/Q24261414 + + + + + http://www.wikidata.org/entity/Q24247034 + + + + + http://www.wikidata.org/entity/Q24261097 + + + +