Class ElasticSearchAdapterTest
- java.lang.Object
-
- org.apache.calcite.adapter.elasticsearch.ElasticSearchAdapterTest
-
public class ElasticSearchAdapterTest extends java.lang.Object
Set of tests for ES adapter. Uses real instance viaEmbeddedElasticsearchPolicy
. Document source is localzips-mini.json
file (located in test classpath).
-
-
Field Summary
Fields Modifier and Type Field Description static EmbeddedElasticsearchPolicy
NODE
private static java.lang.String
ZIPS
Default index/type nameprivate static int
ZIPS_SIZE
-
Constructor Summary
Constructors Constructor Description ElasticSearchAdapterTest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
agg1()
void
approximateCount()
Checks Cardinality aggregationapprox_count_distinct
void
basic()
private CalciteAssert.AssertThat
calciteAssert()
void
emptyResult()
void
groupBy()
void
limit2()
private CalciteAssert.ConnectionFactory
newConnectionFactory()
void
notOperator()
TestingNOT
operatorstatic void
setupInstance()
Used to createzips
index and insert zip data in bulk.void
sortAscDesc()
Sort by multiple fields (in different direction: asc/desc)void
testFilter()
void
testFilterReversed()
void
testFilterSort()
void
testFilterSortDesc()
void
testInPlan()
void
testLimit()
void
testOffsetLimit()
void
testProject()
void
testSort()
void
testSortLimit()
void
testZips()
void
view()
Tests using calcite view
-
-
-
Field Detail
-
NODE
public static final EmbeddedElasticsearchPolicy NODE
-
ZIPS
private static final java.lang.String ZIPS
Default index/type name- See Also:
- Constant Field Values
-
ZIPS_SIZE
private static final int ZIPS_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
setupInstance
public static void setupInstance() throws java.lang.Exception
Used to createzips
index and insert zip data in bulk.- Throws:
java.lang.Exception
- when instance setup failed
-
newConnectionFactory
private CalciteAssert.ConnectionFactory newConnectionFactory()
-
calciteAssert
private CalciteAssert.AssertThat calciteAssert()
-
view
public void view()
Tests using calcite view
-
emptyResult
public void emptyResult()
-
basic
public void basic()
-
testSort
public void testSort()
-
testSortLimit
public void testSortLimit()
-
sortAscDesc
public void sortAscDesc()
Sort by multiple fields (in different direction: asc/desc)
-
testOffsetLimit
public void testOffsetLimit()
-
testLimit
public void testLimit()
-
limit2
public void limit2()
-
testFilterSort
public void testFilterSort()
-
testFilterSortDesc
public void testFilterSortDesc()
-
testInPlan
public void testInPlan()
-
testZips
public void testZips()
-
testProject
public void testProject()
-
testFilter
public void testFilter()
-
testFilterReversed
public void testFilterReversed()
-
agg1
public void agg1()
-
groupBy
public void groupBy()
-
notOperator
public void notOperator()
TestingNOT
operator
-
approximateCount
public void approximateCount() throws java.lang.Exception
Checks Cardinality aggregationapprox_count_distinct
- Throws:
java.lang.Exception
-
-