public abstract class HashIndexOpTestCase extends TestCase2
HashIndexOp implementations.
TODO Test variant with non-empty join vars.
TODO Test variant with SELECT projects only the selected variables.TestCase2.MyProperties, TestCase2.RandomType| Modifier and Type | Field and Description |
|---|---|
protected QueryEngine |
queryEngine |
_randomType, log| Constructor and Description |
|---|
HashIndexOpTestCase() |
HashIndexOpTestCase(String name) |
| Modifier and Type | Method and Description |
|---|---|
protected static <T> T[] |
concat(T[] a,
T[] b)
Combines the two arrays, appending the contents of the 2nd array to the
contents of the first array.
|
Properties |
getProperties()
Reads in the configuration properties for the test from a
variety of resources and returns a properties hierarchy.
|
protected abstract HashIndexOp |
newHashIndexOp(String namespace,
BOp[] args,
NV... anns)
Factory for the
HashIndexOp implementations. |
protected abstract SolutionSetHashJoinOp |
newSolutionSetHashJoinOp(BOp[] args,
NV... anns)
Factory for the
SolutionSetHashJoinOp implementation. |
void |
setUp() |
void |
tearDown() |
void |
test_hashIndexOp_01()
A simple test of a
HashIndexOp followed by a
SolutionSetHashJoinOp. |
void |
test_hashIndexOp_02()
Unit test of variant with an OPTIONAL join.
|
void |
test_hashIndexOp_buildFromSolutionSet()
Test variant where the index is built from a
SolutionSetStream
available as an attribute to the IRunningQuery. |
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, logPropertiesassertEquals, 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, toStringprotected QueryEngine queryEngine
public HashIndexOpTestCase()
public HashIndexOpTestCase(String name)
public Properties getProperties()
TestCase2Properties object, then the lower levels of the
hierarchy are recursively searched.The hierarchy is constructed from the following properties files in the following order. The first property file in this list corresponds to the top of the property hierarchy. The last property file in this list corresponds to the bottom of the property hierarchy. The property resources are:
getProperties in class TestCase2Properties object that supplies bindings for
property names according to the described hierarchy among
property resources. The returned Properties is NOT
cached.
TODO This does not handle the recursive truncation of the
class name to search for "test.properties" yet.public void setUp()
throws Exception
setUp in class junit.framework.TestCaseExceptionpublic void tearDown()
throws Exception
tearDown in class junit.framework.TestCaseExceptionprotected abstract HashIndexOp newHashIndexOp(String namespace, BOp[] args, NV... anns)
HashIndexOp implementations.namespace - The namespace of the lexicon relation (required by the ivCache
for the HTree variants of the HashIndexOp).protected abstract SolutionSetHashJoinOp newSolutionSetHashJoinOp(BOp[] args, NV... anns)
SolutionSetHashJoinOp implementation.protected static <T> T[] concat(T[] a,
T[] b)
a - b - public void test_hashIndexOp_01()
throws Exception
HashIndexOp followed by a
SolutionSetHashJoinOp. In practice we should never follow the
HashIndexOp immediately with a SolutionSetHashJoinOp as
this is basically a complex NOP. However, this does provide a simple test
of the most basic mechanisms for those two operators.Exceptionpublic void test_hashIndexOp_02()
throws Exception
Note: Since there are no intervening joins or filters, this produces the
same output as the unit test above. However, in this case the joinSet
will have been created by the HashIndexOp and utilized by the
SolutionSetHashJoinOp.
Exceptionpublic void test_hashIndexOp_buildFromSolutionSet()
throws Exception
SolutionSetStream
available as an attribute to the IRunningQuery.
FIXME Also test with IHashJoinUtility query attribute as the
source (rather than a SolutionSetStream) and an
IPredicate.ExceptionCopyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.