Package org.apache.calcite.test
Class JdbcAdapterTest
- java.lang.Object
-
- org.apache.calcite.test.JdbcAdapterTest
-
public class JdbcAdapterTest extends java.lang.Object
Tests for theorg.apache.calcite.adapter.jdbc
package.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
JdbcAdapterTest.LockWrapper
Acquires a lock, and releases it when closed.
-
Field Summary
Fields Modifier and Type Field Description private static java.util.concurrent.locks.ReentrantLock
LOCK
Ensures that tests that are modifying data (doing DML) do not run at the same time.
-
Constructor Summary
Constructors Constructor Description JdbcAdapterTest()
-
Method Summary
-
-
-
Method Detail
-
testValuesPlan
public void testValuesPlan()
VALUES is not pushed down, currently.
-
testUnionPlan
public void testUnionPlan()
-
testFilterUnionPlan
public void testFilterUnionPlan()
-
testInPlan
public void testInPlan()
-
testEquiJoinPlan
public void testEquiJoinPlan()
-
testNonEquiJoinPlan
public void testNonEquiJoinPlan()
Test case for [CALCITE-631] Push theta joins down to JDBC adapter.
-
testNonEquiJoinReverseConditionPlan
public void testNonEquiJoinReverseConditionPlan()
-
testMixedJoinPlan
public void testMixedJoinPlan()
-
testMixedJoinWithOrPlan
public void testMixedJoinWithOrPlan()
-
testJoin3TablesPlan
public void testJoin3TablesPlan()
-
testCrossJoinWithJoinKeyPlan
public void testCrossJoinWithJoinKeyPlan()
-
testCartesianJoinWithoutKeyPlan
public void testCartesianJoinWithoutKeyPlan()
-
testCrossJoinWithJoinKeyAndFilterPlan
public void testCrossJoinWithJoinKeyAndFilterPlan()
-
testJoinPlan
public void testJoinPlan()
Test case for [CALCITE-893] Theta join in JdbcAdapter.
-
testJoinPlan2
public void testJoinPlan2()
-
testJoinCartesian
public void testJoinCartesian()
-
testJoinCartesianCount
public void testJoinCartesianCount()
-
testJdbcAggregate
public void testJdbcAggregate() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testOverNonSupportedDialect
public void testOverNonSupportedDialect()
-
testOverDefault
public void testOverDefault()
Test case for [CALCITE-1506] Push OVER Clause to underlying SQL via JDBC adapter.Test runs only on Postgres; the default database, Hsqldb, does not support OVER.
-
testCast
public void testCast()
-
testOverRowsBetweenBoundFollowingAndFollowing
public void testOverRowsBetweenBoundFollowingAndFollowing()
-
testOverRowsBetweenBoundPrecedingAndCurrent
public void testOverRowsBetweenBoundPrecedingAndCurrent()
-
testOverDisallowPartial
public void testOverDisallowPartial()
-
testLastValueOver
public void testLastValueOver()
-
testSubQueryWithSingleValue
public void testSubQueryWithSingleValue()
-
testMetadataTables
public void testMetadataTables() throws java.lang.Exception
Test case for [CALCITE-865] Unknown table type causes NullPointerException in JdbcSchema. The issue occurred because of the "SYSTEM_INDEX" table type when run against PostgreSQL.- Throws:
java.lang.Exception
-
testScalarSubQuery
public void testScalarSubQuery()
-
exclusiveCleanDb
private JdbcAdapterTest.LockWrapper exclusiveCleanDb(java.sql.Connection c) throws java.sql.SQLException
Acquires an exclusive connection to a test database, and cleans it.Cleans any previous TableModify states and creates one expense_fact instance with store_id = 666.
Caller must close the returned wrapper, so that the next test can acquire the lock and use the database.
- Parameters:
c
- JDBC connection- Throws:
java.sql.SQLException
-
testTableModifyInsert
public void testTableModifyInsert() throws java.lang.Exception
Test case for [CALCITE-1527] Support DML in the JDBC adapter.- Throws:
java.lang.Exception
-
testTableModifyInsertMultiValues
public void testTableModifyInsertMultiValues() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testTableModifyInsertWithSubQuery
public void testTableModifyInsertWithSubQuery() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testTableModifyUpdate
public void testTableModifyUpdate() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testTableModifyDelete
public void testTableModifyDelete() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testColumnNullability
public void testColumnNullability() throws java.lang.Exception
- Throws:
java.lang.Exception
-
pushBindParameters
public void pushBindParameters() throws java.lang.Exception
- Throws:
java.lang.Exception
-
-