public class TestGroupByState extends TestCase2
GroupByState
.TestCase2.MyProperties, TestCase2.RandomType
_randomType, log
Constructor and Description |
---|
TestGroupByState() |
TestGroupByState(String name) |
Modifier and Type | Method and Description |
---|---|
protected void |
setUp() |
protected void |
tearDown() |
void |
test_aggregateExpr_01()
Unit test with SELECT clause having one value expression, which is a
simple variable also appearing as the sole value expression in the
GROUP_BY clause.
|
void |
test_aggregateExpr_02()
Unit test with SELECT clause having one value expression, which is a
simple variable also appearing as the sole value expression in the
GROUP_BY clause.
|
void |
test_aggregateExpr_03()
Unit test for references to aggregate declared in GROUP_BY with AS.
|
void |
test_aggregateExpr_04()
Unit test verifies that a constant within a group by clause does not
cause the group by clause to be interpreted as an aggregate.
|
void |
test_complexHavingClause()
SELECT SUM(?y) as ?x
GROUP BY ?z
HAVING SUM(?y) > 10
|
void |
test_correctRejection()
Unit test for bad arguments.
|
void |
test_forwardReference_not_allowed()
Forward references to a variable are not allowed.
|
void |
test_isAnyDistinct_having()
Unit test for IGroupByState#isAnyDistinct()) where the DISTINCT
keyword appears within an {@link IAggregate} in the SELECT clause.
|
void |
test_isAnyDistinct_select()
Unit test for IGroupByState#isAnyDistinct()) where the DISTINCT
keyword appears within an {@link IAggregate} in the SELECT clause.
|
void |
test_nestedAggregates()
SELECT SUM(?x+MIN(?y)) as ?z
GROUP BY ?a
|
void |
test_reverseReference_allowed_aka_select_dependency()
Verify that a reference to a variable defined by a previous select
expression is allowed and that the select dependency is recognized.
|
void |
test_simpleAggregate_noGroupBy()
Unit test with simple aggregate function in SELECT clause and no GROUP BY
clause (the aggregation is taken across all solutions as if they were a
single group).
|
void |
test_simpleAggregate()
Unit test with simple aggregate function in SELECT clause.
|
void |
test_simpleHavingClause()
SELECT SUM(?y) as ?x
GROUP BY ?z
HAVING ?x > 10
|
void |
test_with_constant()
Unit test when projecting a constant
|
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, getProperties, 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 TestGroupByState()
public TestGroupByState(String name)
name
- protected void setUp() throws Exception
setUp
in class junit.framework.TestCase
Exception
protected void tearDown() throws Exception
tearDown
in class junit.framework.TestCase
Exception
public void test_aggregateExpr_01()
SELECT ?org GROUP BY ?org
public void test_aggregateExpr_02()
SELECT ?org as ?newVar GROUP BY ?org
public void test_simpleAggregate()
SELECT ?org, SUM(?lprice) AS ?totalPrice GROUP BY ?org
public void test_simpleAggregate_noGroupBy()
SELECT SUM(?lprice) AS ?totalPrice
public void test_aggregateExpr_03()
SELECT ?org2 GROUP BY UCASE(?org) as ?org2
public void test_aggregateExpr_04()
select ?index group by (?o + 1 AS ?index)
public void test_simpleHavingClause()
SELECT SUM(?y) as ?x GROUP BY ?z HAVING ?x > 10
public void test_complexHavingClause()
SELECT SUM(?y) as ?x GROUP BY ?z HAVING SUM(?y) > 10
public void test_nestedAggregates()
SELECT SUM(?x+MIN(?y)) as ?z GROUP BY ?a
public void test_reverseReference_allowed_aka_select_dependency()
SELECT SUM(?y) as ?z, SUM(?x)+?z as ?a GROUP BY ?b
public void test_forwardReference_not_allowed()
SELECT SUM(?x)+?z as ?a, SUM(?y) as ?z ... (forward reference to z)
public void test_isAnyDistinct_select()
SELECT SUM(DISTINCT ?y) as ?x GROUP BY ?z HAVING ?x > 10
public void test_isAnyDistinct_having()
SELECT SUM(?y) as ?x GROUP BY ?z HAVING SUM(DISTINCT ?y) > 10
public void test_with_constant()
SELECT 12 as ?x
public void test_correctRejection()
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.