public class TestASTWildcardProjectionOptimizer extends AbstractASTEvaluationTestCase
ASTWildcardProjectionOptimizer
.TestCase2.MyProperties, TestCase2.RandomType
baseURI, store, valueFactory
_randomType
Constructor and Description |
---|
TestASTWildcardProjectionOptimizer() |
TestASTWildcardProjectionOptimizer(String name) |
Modifier and Type | Method and Description |
---|---|
void |
test_wildcard_nestedSubquery()
SELECT *
JoinGroupNode {
SELECT (*) {
JoinGroupNode {
StatementPatternNode(VarNode(s), ConstantNode(TermId(2U)[http://example/p]), VarNode(o), DEFAULT_CONTEXTS)
}
}
StatementPatternNode(VarNode(s), ConstantNode(TermId(3U)[http://example/q]), VarNode(x), DEFAULT_CONTEXTS)
}
|
void |
test_wildcardProjectionOptimizer00()
SELECT *
JoinGroupNode {
UnionNode {
JoinGroupNode {
StatementPatternNode(VarNode(s), ConstantNode(TermId(2U)[http://example/p]), VarNode(o), DEFAULT_CONTEXTS)
}
JoinGroupNode {
StatementPatternNode(VarNode(s), ConstantNode(TermId(3U)[http://example/q]), VarNode(o), DEFAULT_CONTEXTS)
}
}
}
|
void |
test_wildcardProjectionOptimizer01()
SELECT DISTINCT *
JoinGroupNode {
UnionNode {
JoinGroupNode {
StatementPatternNode(VarNode(s), ConstantNode(TermId(2U)[http://example/p]), VarNode(o), DEFAULT_CONTEXTS)
}
JoinGroupNode {
StatementPatternNode(VarNode(s), ConstantNode(TermId(3U)[http://example/q]), VarNode(o), DEFAULT_CONTEXTS)
}
}
}
|
void |
test_wildcardProjectionOptimizer02()
SELECT REDUCED *
JoinGroupNode {
UnionNode {
JoinGroupNode {
StatementPatternNode(VarNode(s), ConstantNode(TermId(2U)[http://example/p]), VarNode(o), DEFAULT_CONTEXTS)
}
JoinGroupNode {
StatementPatternNode(VarNode(s), ConstantNode(TermId(3U)[http://example/q]), VarNode(o), DEFAULT_CONTEXTS)
}
}
}
|
void |
test_wildcardProjectionOptimizer03()
Given the query:
|
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 TestASTWildcardProjectionOptimizer()
public TestASTWildcardProjectionOptimizer(String name)
name
- public void test_wildcardProjectionOptimizer00()
SELECT * JoinGroupNode { UnionNode { JoinGroupNode { StatementPatternNode(VarNode(s), ConstantNode(TermId(2U)[http://example/p]), VarNode(o), DEFAULT_CONTEXTS) } JoinGroupNode { StatementPatternNode(VarNode(s), ConstantNode(TermId(3U)[http://example/q]), VarNode(o), DEFAULT_CONTEXTS) } } }
public void test_wildcardProjectionOptimizer01()
SELECT DISTINCT * JoinGroupNode { UnionNode { JoinGroupNode { StatementPatternNode(VarNode(s), ConstantNode(TermId(2U)[http://example/p]), VarNode(o), DEFAULT_CONTEXTS) } JoinGroupNode { StatementPatternNode(VarNode(s), ConstantNode(TermId(3U)[http://example/q]), VarNode(o), DEFAULT_CONTEXTS) } } }
public void test_wildcardProjectionOptimizer02()
SELECT REDUCED * JoinGroupNode { UnionNode { JoinGroupNode { StatementPatternNode(VarNode(s), ConstantNode(TermId(2U)[http://example/p]), VarNode(o), DEFAULT_CONTEXTS) } JoinGroupNode { StatementPatternNode(VarNode(s), ConstantNode(TermId(3U)[http://example/q]), VarNode(o), DEFAULT_CONTEXTS) } } }
public void test_wildcard_nestedSubquery()
SELECT * JoinGroupNode { SELECT (*) { JoinGroupNode { StatementPatternNode(VarNode(s), ConstantNode(TermId(2U)[http://example/p]), VarNode(o), DEFAULT_CONTEXTS) } } StatementPatternNode(VarNode(s), ConstantNode(TermId(3U)[http://example/q]), VarNode(x), DEFAULT_CONTEXTS) }
public void test_wildcardProjectionOptimizer03()
SELECT (COUNT(*) as ?c) { SELECT * { SELECT * { ?s ?p ?o } } LIMIT 21 OFFSET 0 }We obtain the following AST:
QueryType: SELECT includeInferred=true SELECT ( com.bigdata.rdf.sparql.ast.FunctionNode(VarNode(*))[ FunctionNode.scalarVals=null, FunctionNode.functionURI=http://www.w3.org/2006/sparql-functions#count, valueExpr=com.bigdata.bop.rdf.aggregate.COUNT(*)] AS VarNode(c) ) JoinGroupNode { JoinGroupNode { QueryType: SELECT SELECT * JoinGroupNode { JoinGroupNode { QueryType: SELECT SELECT * JoinGroupNode { StatementPatternNode(VarNode(s), VarNode(p), VarNode(o)) [scope=DEFAULT_CONTEXTS] } } } slice(limit=21) } }This is the current AST as rewritten:
QueryType: SELECT includeInferred=true SELECT ( com.bigdata.rdf.sparql.ast.FunctionNode(VarNode(*))[ FunctionNode.scalarVals=null, FunctionNode.functionURI=http://www.w3.org/2006/sparql-functions#count, valueExpr=com.bigdata.bop.rdf.aggregate.COUNT(*)] AS VarNode(c) ) JoinGroupNode { JoinGroupNode { QueryType: SELECT SELECT * # ==> SELECT ?s ?p ?o JoinGroupNode { JoinGroupNode { QueryType: SELECT SELECT * # ==> SELECT ?s ?p ?o JoinGroupNode { StatementPatternNode(VarNode(s), VarNode(p), VarNode(o)) [scope=DEFAULT_CONTEXTS] } } } slice(limit=21) } }
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.