public class TestStaticAnalysis_CanJoinUsingConstraints extends AbstractASTEvaluationTestCase
IJoinNode
may be
added to the join path based on shared variables. Static analysis easily
reports those joins which are allowed based on the variables directly given
with two IJoinNode
s. The purpose of this test suite is to explore
when joins (based on shared variables) become permissible through
FilterNode
s as the variable(s) used within those constraints become
bound.
This set of unit tests explores various join paths and verifies that the canJoin() and canJoinUsingConstraints() methods correctly recognize edges by which a join path can be extended corresponding to both static and dynamic analysis of the query.
StaticAnalysis_CanJoin.canJoin(IJoinNode, IJoinNode)
,
StaticAnalysis#canJoinUsingConstraints(IJoinNode[], IJoinNode, FilterNode[])}
TestCase2.MyProperties, TestCase2.RandomType
baseURI, store, valueFactory
_randomType
Constructor and Description |
---|
TestStaticAnalysis_CanJoinUsingConstraints() |
TestStaticAnalysis_CanJoinUsingConstraints(String name) |
Modifier and Type | Method and Description |
---|---|
void |
test_attachConstraints_BSBM_Q5_path01()
path = [1, 2, 4, 6, 0, 3, 5] |
void |
test_attachConstraints_BSBM_Q5_path02()
[5, 3, 1, 0, 2, 4, 6] . |
void |
test_attachConstraints_BSBM_Q5_path03()
[3, 4, 5, 6, 1, 2, 0] (key-range constraint variant). |
void |
test_attachConstraints_BSBM_Q5_path04()
[5 6 0 2 1 4 3] . |
void |
test_canJoinUsingConstraints_1step_productVar()
Unit test for one-step joins based on the
#product variable. |
void |
test_canJoinUsingConstraints_illegalArgument()
Unit tests to verify that arguments are validated.
|
void |
test_canJoinUsingConstraints_multiStep_productVar()
Unit test for multi-step join paths based on the
#product
variable. |
void |
test_canJoinUsingConstraints_p3_p4()
Unit test examines the predicates without shared variables and verifies
(a) that joins are not permitted when the constraints are not considered;
and (b) that joins are permitted when the constraints are considered.
|
void |
test_canJoinUsingConstraints_p5_p6()
Unit test examines the predicates without shared variables and verifies
(a) that joins are not permitted when the constraints are not considered;
and (b) that joins are permitted when the constraints are considered.
|
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 TestStaticAnalysis_CanJoinUsingConstraints()
public TestStaticAnalysis_CanJoinUsingConstraints(String name)
name
- public void test_canJoinUsingConstraints_illegalArgument()
public void test_canJoinUsingConstraints_1step_productVar()
#product
variable.public void test_canJoinUsingConstraints_multiStep_productVar()
#product
variable.public void test_canJoinUsingConstraints_p3_p4()
This test is identical to test_canJoinUsingConstraints_p5_p6()()
except that it considers the (#p3
x #p4
) join via the
#c1
constraint instead.
public void test_canJoinUsingConstraints_p5_p6()
This test is identical to test_canJoinUsingConstraints_p3_p4()
except that it considers the (#p5
x #p6
) join via the
#c2
constraint instead.
public void test_attachConstraints_BSBM_Q5_path01()
path = [1, 2, 4, 6, 0, 3, 5]
public void test_attachConstraints_BSBM_Q5_path02()
[5, 3, 1, 0, 2, 4, 6]
.public void test_attachConstraints_BSBM_Q5_path03()
[3, 4, 5, 6, 1, 2, 0]
(key-range constraint variant).public void test_attachConstraints_BSBM_Q5_path04()
[5 6 0 2 1 4 3]
.
FIXME The above join path produces a false ZERO result for the query and
all of the join path segments below produce a false exact ZERO (0E)
cardinality estimate. Figure out why. The final path chosen could have
been any of the one step extensions of a path with a false 0E cardinality
estimate.
INFO : 3529 main com.bigdata.bop.joinGraph.rto.JGraph.expand(JGraph.java:1116): ** round=4: paths{in=14,considered=26,out=6} path srcCard * f ( in sumRgCt tplsRead out limit adjCard) = estRead estCard : sumEstRead sumEstCard sumEstCost joinPath 0 0E * 0.00 ( 0 0 0 0 200 0) = 0 0E : 1 0 0 [ 5 6 0 2 1 4 ] 1 0E * 0.00 ( 0 0 0 0 200 0) = 0 0E : 1 0 0 [ 5 6 0 2 4 3 ] 2 0E * 0.00 ( 0 0 0 0 200 0) = 0 0E : 1 0 0 [ 5 6 0 4 1 3 ] 3 0E * 0.00 ( 0 0 0 0 200 0) = 0 0E : 1 0 0 [ 5 6 2 1 4 3 ] 4 208 * 1.00 ( 26 26 26 26 400 26) = 26 208 : 16576 1447 1447 [ 5 3 1 2 4 0 ] 5 0E * 0.00 ( 0 0 0 0 200 0) = 0 0E : 2 1 1 [ 5 3 6 0 1 2 ]
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.