public class TestASTStaticJoinOptimizer extends AbstractOptimizerTestCase
ASTStaticJoinOptimizer
.AbstractOptimizerTestCase.Annotations, AbstractOptimizerTestCase.ApplyAnnotation, AbstractOptimizerTestCase.ASTPropertyPathOptimizerInTest, AbstractOptimizerTestCase.Helper
TestCase2.MyProperties, TestCase2.RandomType
baseURI, store, valueFactory
_randomType
Constructor and Description |
---|
TestASTStaticJoinOptimizer() |
TestASTStaticJoinOptimizer(String name) |
Modifier and Type | Method and Description |
---|---|
protected ASTStaticJoinOptimizer |
newOptimizer()
Return the
IASTOptimizer to be evaluated by the AbstractOptimizerTestCase.Helper . |
void |
test_nestedOptionals01()
Given
|
void |
test_nestedOptionals02() |
void |
test_nestedOptionals03() |
void |
test_NSI01() |
void |
test_NSI01X() |
void |
test_pessimistic()
Given
?producer bsbm:country
|
void |
test_runFirstRunLast_01() |
void |
test_runFirstRunLast_02() |
void |
test_ServiceNode01()
Given
|
void |
test_ServiceNode02()
Given
|
void |
test_simpleOptional01()
Given
|
void |
test_simpleOptional01A() |
void |
test_simpleReorder01()
Given
|
void |
test_simpleReorder02()
Given
|
void |
test_simpleReorder03()
Given
|
void |
test_simpleReorder04()
Given
|
void |
test_union_trac684_A() |
void |
test_union_trac684_B() |
void |
test_union_trac684_C() |
newStatementPatternNode, newStatementPatternNode, newStatementPatternNode
assertSameAST, asSet, asSet, asSet, asSet, asSet, enableDeleteMarkersInIndes, getBOpContext, getProperties, getStore, makeIV, setUp, tearDown
assertSameSolutions, assertSameSolutions, assertSameSolutions, assertSameSolutionsAnyOrder, assertSameSolutionsAnyOrder, assertSameSolutionsAnyOrder, assertSameSolutionsAnyOrder, assertSameSolutionsAnyOrder, assertSameSolutionsAnyOrder, compareGraphs, compareTupleQueryResults, diff
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEqualsWithinUlps, assertSameArray, assertSameArray, assertSameBigDecimal, assertSameBigDecimal, assertSameBigInteger, assertSameBigInteger, assertSameIterator, assertSameIterator, assertSameIteratorAnyOrder, assertSameIteratorAnyOrder, assertSameValue, assertSameValue, assertZeroUlps, assertZeroUlps, fail, getInnerCause, getNormalInt, getProjectBuildPath, getRandomObject, getRandomObject, getRandomOrder, getRandomString, getTestInputStream, getTestResource, getTestResource, getUlps, getUlps, isDEBUG, isDEBUG, isINFO, isINFO, isInnerCause, logProperties
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toString
public TestASTStaticJoinOptimizer()
public TestASTStaticJoinOptimizer(String name)
name
- protected ASTStaticJoinOptimizer newOptimizer()
AbstractOptimizerTestCase
IASTOptimizer
to be evaluated by the AbstractOptimizerTestCase.Helper
.
This may be an ASTOptimizerList
if you need to chain multiple
optimizers together in order to evaluate their behavior.public void test_simpleOptional01A()
public void test_simpleReorder01()
SELECT VarNode(x) JoinGroupNode { StatementPatternNode(VarNode(x), ConstantNode(b), ConstantNode(b)) StatementPatternNode(VarNode(x), ConstantNode(a), ConstantNode(a)) }Reorder as
SELECT VarNode(x) JoinGroupNode { StatementPatternNode(VarNode(x), ConstantNode(a), ConstantNode(a)) StatementPatternNode(VarNode(x), ConstantNode(b), ConstantNode(b)) }
public void test_simpleReorder02()
SELECT VarNode(x) JoinGroupNode { JoinGroupNode { } StatementPatternNode(VarNode(x), ConstantNode(b), ConstantNode(b)) JoinGroupNode { } StatementPatternNode(VarNode(x), ConstantNode(a), ConstantNode(a)) JoinGroupNode { } }Reorder as
SELECT VarNode(x) JoinGroupNode { JoinGroupNode { } StatementPatternNode(VarNode(x), ConstantNode(a), ConstantNode(a)) JoinGroupNode { } StatementPatternNode(VarNode(x), ConstantNode(b), ConstantNode(b)) JoinGroupNode { } }
public void test_simpleReorder03()
SELECT VarNode(x) JoinGroupNode { StatementPatternNode(VarNode(x), ConstantNode(e), ConstantNode(e)) StatementPatternNode(VarNode(x), ConstantNode(b), ConstantNode(b)) StatementPatternNode(VarNode(x), ConstantNode(d), ConstantNode(d)) StatementPatternNode(VarNode(x), ConstantNode(a), ConstantNode(a)) StatementPatternNode(VarNode(x), ConstantNode(c), ConstantNode(c)) }Reorder as
SELECT VarNode(x) JoinGroupNode { StatementPatternNode(VarNode(x), ConstantNode(a), ConstantNode(a)) StatementPatternNode(VarNode(x), ConstantNode(b), ConstantNode(b)) StatementPatternNode(VarNode(x), ConstantNode(c), ConstantNode(c)) StatementPatternNode(VarNode(x), ConstantNode(d), ConstantNode(d)) StatementPatternNode(VarNode(x), ConstantNode(e), ConstantNode(e)) }
public void test_simpleReorder04()
SELECT VarNode(x) JoinGroupNode { JoinGroupNode { } StatementPatternNode(VarNode(x), ConstantNode(e), ConstantNode(e)) JoinGroupNode { } StatementPatternNode(VarNode(x), ConstantNode(b), ConstantNode(b)) JoinGroupNode { } StatementPatternNode(VarNode(x), ConstantNode(d), ConstantNode(d)) JoinGroupNode { } JoinGroupNode { } StatementPatternNode(VarNode(x), ConstantNode(a), ConstantNode(a)) JoinGroupNode { } StatementPatternNode(VarNode(x), ConstantNode(c), ConstantNode(c)) }Reorder as
SELECT VarNode(x) JoinGroupNode { JoinGroupNode { } StatementPatternNode(VarNode(x), ConstantNode(a), ConstantNode(a)) JoinGroupNode { } StatementPatternNode(VarNode(x), ConstantNode(b), ConstantNode(b)) JoinGroupNode { } StatementPatternNode(VarNode(x), ConstantNode(c), ConstantNode(c)) JoinGroupNode { } JoinGroupNode { } StatementPatternNode(VarNode(x), ConstantNode(d), ConstantNode(d)) JoinGroupNode { } StatementPatternNode(VarNode(x), ConstantNode(e), ConstantNode(e)) }
public void test_simpleOptional01()
SELECT VarNode(x) JoinGroupNode { StatementPatternNode(VarNode(x), ConstantNode(e), ConstantNode(e)) StatementPatternNode(VarNode(x), ConstantNode(b), ConstantNode(b)) StatementPatternNode(VarNode(x), ConstantNode(d), ConstantNode(d)) StatementPatternNode(VarNode(x), ConstantNode(a), ConstantNode(a)) StatementPatternNode(VarNode(x), ConstantNode(c), ConstantNode(c)) StatementPatternNode(VarNode(x), ConstantNode(f), ConstantNode(f)) [OPTIONAL] StatementPatternNode(VarNode(x), ConstantNode(g), ConstantNode(g)) [OPTIONAL] }Reorder as
SELECT VarNode(x) JoinGroupNode { StatementPatternNode(VarNode(x), ConstantNode(a), ConstantNode(a)) StatementPatternNode(VarNode(x), ConstantNode(b), ConstantNode(b)) StatementPatternNode(VarNode(x), ConstantNode(c), ConstantNode(c)) StatementPatternNode(VarNode(x), ConstantNode(d), ConstantNode(d)) StatementPatternNode(VarNode(x), ConstantNode(e), ConstantNode(e)) StatementPatternNode(VarNode(x), ConstantNode(f), ConstantNode(f)) [OPTIONAL] StatementPatternNode(VarNode(x), ConstantNode(g), ConstantNode(g)) [OPTIONAL] }
public void test_ServiceNode01()
SELECT VarNode(x) JoinGroupNode { ServiceNode { StatementPatternNode(VarNode(x), ConstantNode(bd:search), ConstantNode("foo") } StatementPatternNode(VarNode(y), ConstantNode(b), ConstantNode(b)) [CARDINALITY=1] StatementPatternNode(VarNode(x), ConstantNode(a), VarNode(y)) [CARDINALITY=2] }Reorder as
SELECT VarNode(x) JoinGroupNode { ServiceNode { StatementPatternNode(VarNode(x), ConstantNode(bd:search), ConstantNode("foo") } StatementPatternNode(VarNode(x), ConstantNode(a), VarNode(y)) [CARDINALITY=2] StatementPatternNode(VarNode(y), ConstantNode(b), ConstantNode(b)) [CARDINALITY=1] }
public void test_ServiceNode02()
SELECT VarNode(x) JoinGroupNode { ServiceNode { StatementPatternNode(VarNode(x), ConstantNode(bd:search), ConstantNode("foo") } StatementPatternNode(VarNode(x), ConstantNode(f), ConstantNode(f)) [CARDINALITY=1, OPTIONAL] StatementPatternNode(VarNode(y), ConstantNode(d), ConstantNode(d)) [CARDINALITY=3] StatementPatternNode(VarNode(y), ConstantNode(g), ConstantNode(g)) [CARDINALITY=1, OPTIONAL] StatementPatternNode(VarNode(y), ConstantNode(c), ConstantNode(c)) [CARDINALITY=2] StatementPatternNode(VarNode(y), ConstantNode(e), ConstantNode(e)) [CARDINALITY=4] StatementPatternNode(VarNode(x), ConstantNode(a), VarNode(y)) [CARDINALITY=1000] StatementPatternNode(VarNode(y), ConstantNode(b), ConstantNode(b)) [CARDINALITY=1] }Reorder as
SELECT VarNode(x) JoinGroupNode { ServiceNode { StatementPatternNode(VarNode(x), ConstantNode(bd:search), ConstantNode("foo") } StatementPatternNode(VarNode(x), ConstantNode(a), VarNode(y)) [CARDINALITY=1000] StatementPatternNode(VarNode(y), ConstantNode(b), ConstantNode(b)) [CARDINALITY=1] StatementPatternNode(VarNode(y), ConstantNode(c), ConstantNode(c)) [CARDINALITY=2] StatementPatternNode(VarNode(y), ConstantNode(d), ConstantNode(d)) [CARDINALITY=3] StatementPatternNode(VarNode(y), ConstantNode(e), ConstantNode(e)) [CARDINALITY=4] StatementPatternNode(VarNode(x), ConstantNode(f), ConstantNode(f)) [CARDINALITY=1, OPTIONAL] StatementPatternNode(VarNode(y), ConstantNode(g), ConstantNode(g)) [CARDINALITY=1, OPTIONAL] }
public void test_nestedOptionals01()
SELECT VarNode(x) JoinGroupNode { StatementPatternNode(VarNode(x), ConstantNode(b), ConstantNode(b)) [CARDINALITY=2] StatementPatternNode(VarNode(x), ConstantNode(c), ConstantNode(c)) [CARDINALITY=3] StatementPatternNode(VarNode(x), ConstantNode(a), ConstantNode(a)) [CARDINALITY=1] JoinGroupNode { StatementPatternNode(VarNode(x), ConstantNode(d), ConstantNode(d)) [CARDINALITY=10] StatementPatternNode(VarNode(y), ConstantNode(f), ConstantNode(f)) [CARDINALITY=5] StatementPatternNode(VarNode(y), ConstantNode(e), ConstantNode(e)) [CARDINALITY=4] } }Reorder as
SELECT VarNode(x) JoinGroupNode { StatementPatternNode(VarNode(x), ConstantNode(a), ConstantNode(a)) [CARDINALITY=1] StatementPatternNode(VarNode(x), ConstantNode(b), ConstantNode(b)) [CARDINALITY=2] StatementPatternNode(VarNode(x), ConstantNode(c), ConstantNode(c)) [CARDINALITY=3] JoinGroupNode { StatementPatternNode(VarNode(x), ConstantNode(d), ConstantNode(d)) [CARDINALITY=10] StatementPatternNode(VarNode(y), ConstantNode(e), ConstantNode(e)) [CARDINALITY=4] StatementPatternNode(VarNode(y), ConstantNode(f), ConstantNode(f)) [CARDINALITY=5] } }
public void test_nestedOptionals02()
public void test_nestedOptionals03()
public void test_NSI01X()
public void test_NSI01()
public void test_pessimistic()
select * JoinGroupNode { StatementPatternNode(VarNode(productType), ConstantNode(rdf:type), ConstantNode(#ProductType)) [2000] StatementPatternNode(VarNode(product), ConstantNode(rdf:type), VarNode(productType)) [10m] StatementPatternNode(VarNode(product), ConstantNode(#producer), VarNode(producer)) [280k] StatementPatternNode(VarNode(producer), ConstantNode(#country), ConstantNode(#RU)) [7000] StatementPatternNode(VarNode(review), ConstantNode(#reviewFor), VarNode(product)) [2.8m] StatementPatternNode(VarNode(review), ConstantNode(#reviewer), VarNode(reviewer)) [2.8m] StatementPatternNode(VarNode(reviewer), ConstantNode(#country), ConstantNode(#US)) [61k] hint:Prior hint:com.bigdata.rdf.sparql.ast.optimizers.ASTStaticJoinOptimizer.optimistic "false" . }Reorder as
select * JoinGroupNode { StatementPatternNode(VarNode(producer), ConstantNode(#country), ConstantNode(#RU)) [7000] StatementPatternNode(VarNode(product), ConstantNode(#producer), VarNode(producer)) [280k] StatementPatternNode(VarNode(review), ConstantNode(#reviewFor), VarNode(product)) [2.8m] StatementPatternNode(VarNode(review), ConstantNode(#reviewer), VarNode(reviewer)) [2.8m] StatementPatternNode(VarNode(reviewer), ConstantNode(#country), ConstantNode(#US)) [61k] StatementPatternNode(VarNode(product), ConstantNode(rdf:type), VarNode(productType)) [10m] StatementPatternNode(VarNode(productType), ConstantNode(rdf:type), ConstantNode(#ProductType)) [2000] }
public void test_runFirstRunLast_01()
public void test_union_trac684_A()
public void test_union_trac684_B()
public void test_union_trac684_C()
public void test_runFirstRunLast_02()
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.