public class SubqueryFlatteningTest extends BaseJDBCTestCase
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE| Constructor and Description |
|---|
SubqueryFlatteningTest(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
private void |
checkExistsJoin(java.sql.Statement s,
java.lang.String sql,
java.lang.String[][] rows,
boolean flattenable)
Check that a query returns the expected rows and whether or not it was
flattened to an exists join (or not exists join).
|
private void |
enableRuntimeStatistics(java.sql.Statement s)
Enable collection of runtime statistics in the current connection.
|
protected void |
setUp()
Set up the test environment.
|
static junit.framework.Test |
suite() |
void |
testAllNotFlattenableToNotExists()
DERBY-4001: Test that some ALL subqueries that used to be flattened to
a not exists join and return incorrect results, are not flattened.
|
void |
testNotExistsFlattenablePredicatesNotPulled()
DERBY-4001: Test that certain NOT EXISTS/NOT IN/ALL subqueries are
flattened, and that their predicates are not pulled out.
|
void |
testNotInNotFlattenableToNotExists()
DERBY-4001: Test that some NOT IN subqueries that used to be flattened
to a not exists join and return incorrect results, are not flattened.
|
assertCallError, assertCheckTable, assertCompileError, assertEquals, assertEquals, assertEquals, assertEquivalentDataType, assertErrorCode, assertGetIntError, assertNextError, assertPreparedStatementError, assertSQLExceptionEquals, assertSQLState, assertSQLState, assertStatementError, assertStatementError, assertStatementError, assertStatementError, assertStatementErrorUnordered, assertTableRowCount, assertUpdateCount, assertUpdateCount, assertWarning, checkAllConsistency, checkEstimatedRowCount, closeStatement, commit, createStatement, createStatement, createStatement, dropTable, dropTable, dropView, dropView, emptyStatementCache, getClientTransactionID, getConnection, getDatabaseProperty, getLastSQLException, initializeConnection, openConnection, openDefaultConnection, openDefaultConnection, openDefaultConnection, openUserConnection, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, rollback, runBare, runBareOverridable, runScript, runScript, runSQLCommands, setAutoCommit, tearDown, usingDB2Client, usingDerbyNetClient, usingEmbeddedalarm, assertDirectoryDeleted, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertExecJavaCmdAsExpected, assertLaunchedJUnitTestMethod, assertLaunchedJUnitTestMethod, assertSecurityManager, assertThrowableEquals, currentDirectory, execJavaCmd, execJavaCmd, fail, getClassVersionMajor, getEmmaJar, getFailureFolder, getFilesWith, getJavaExecutableName, getSystemProperty, getTestConfiguration, getTestResource, hasInterruptibleIO, isCVM, isIBMJVM, isJ9Platform, isJava5, isJava7, isJava8, isPhoneME, isPlatform, isSunJVM, isWindowsPlatform, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeFiles, removeSystemProperty, runsWithEmma, runsWithJaCoCo, setSystemProperty, sleep, sleepAtLeastOneTick, traceitassertEquals, 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, runTest, setName, toStringpublic static junit.framework.Test suite()
protected void setUp()
throws java.sql.SQLException
BaseJDBCTestCase.tearDown().setUp in class junit.framework.TestCasejava.sql.SQLExceptionprivate void enableRuntimeStatistics(java.sql.Statement s)
throws java.sql.SQLException
s - the statement to use for enabling runtime statisticsjava.sql.SQLExceptionprivate void checkExistsJoin(java.sql.Statement s,
java.lang.String sql,
java.lang.String[][] rows,
boolean flattenable)
throws java.sql.SQLException
s - the statement on which the query is executedsql - the query textrows - the expected resultflattenable - whether or not we expect the query to be flattened
to a (not) exists joinjava.sql.SQLException - if a database error occursjunit.framework.AssertionFailedError - if the wrong results are
returned from the query, or if the query plan is not as expectedpublic void testNotExistsFlattenablePredicatesNotPulled()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testAllNotFlattenableToNotExists()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testNotInNotFlattenableToNotExists()
throws java.sql.SQLException
java.sql.SQLExceptionApache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.