public class JoinTest extends BaseJDBCTestCase
| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String |
AMBIGUOUS_COLNAME |
private static java.lang.String |
COLUMN_NOT_IN_SCOPE |
private static java.lang.String |
NO_COLUMNS |
private static java.lang.String |
NON_COMPARABLE |
private static java.lang.String |
SYNTAX_ERROR |
private static java.lang.String |
TABLE_NAME_NOT_IN_SCOPE |
private static java.lang.String |
VALUES_WITH_NULL |
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE| Constructor and Description |
|---|
JoinTest(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
private static java.lang.String[][] |
cross(java.lang.String[][] t1,
java.lang.String[][] t2)
Calculate the Cartesian product of two tables.
|
private void |
fillTable(java.lang.String sql,
java.lang.String[][] data)
Fill a table with rows.
|
(package private) static void |
insertTourRow(java.sql.PreparedStatement ps,
int a,
java.lang.String b,
java.lang.String c) |
(package private) static void |
insertTourRow(java.sql.PreparedStatement ps,
java.lang.String a,
java.lang.String b) |
private static java.lang.String[][] |
project(int[] cols,
java.lang.String[][] rows)
Project columns from a table.
|
private static java.lang.String[][] |
reverse(java.lang.String[][] rows)
Reverse the order of rows in a table.
|
static junit.framework.Test |
suite() |
void |
testCrossJoins()
Test the CROSS JOIN syntax that was added in DERBY-4355.
|
void |
testDerby_4405()
Derby-4405 improve rewrite of OUTER JOIN to INNER JOIN in presence of
null intolerant predicate.
|
void |
testDerby_4679()
DERBY-4679.
|
void |
testDerby_4695()
This test works prior to applying the patch for DERBY-4695, but the
corrected (internal, intermediate) behavior can be observed by applying
the patch
trace-remapping.diff attached to this issue in JIRA and
copmparing the results before and after the rest of the patch is
applied. |
void |
testDerby_5933()
DERBY-5933.
|
void |
testDerby4372()
DERBY-4372: Some joins used to miss some rows after an index was
created, because the start and stop keys passed to the index scan were
wrong if the IN list in the JOIN condition contained a NULL.
|
void |
testDerby4387()
Test that computation of transitive closure of equi-join does not give
rise to eternal loop in a case where a predicate of type T1.x = T1.y is
added to the closure.
|
void |
testNaturalJoin()
Tests for the NATURAL JOIN syntax added in DERBY-4495.
|
void |
testNullabilityInLeftOrRightOuterJoin()
Test that the columns returned by a left or right outer join have the
correct nullability.
|
void |
testNullabilityInValues()
DERBY-4365 Test that the NULL values are caught in VALUES clause when it
is part of a non-INSERT statement.
|
void |
testSubqueryInON()
Test that ON clauses can contain subqueries (DERBY-4380).
|
void |
testUsingClause()
Tests for the USING clause added in DERBY-4370.
|
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, setUp, toStringprivate static final java.lang.String SYNTAX_ERROR
private static final java.lang.String AMBIGUOUS_COLNAME
private static final java.lang.String COLUMN_NOT_IN_SCOPE
private static final java.lang.String NON_COMPARABLE
private static final java.lang.String NO_COLUMNS
private static final java.lang.String TABLE_NAME_NOT_IN_SCOPE
private static final java.lang.String VALUES_WITH_NULL
public static junit.framework.Test suite()
public void testNullabilityInValues()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testNullabilityInLeftOrRightOuterJoin()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testDerby4372()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testCrossJoins()
throws java.sql.SQLException
java.sql.SQLExceptionprivate void fillTable(java.lang.String sql,
java.lang.String[][] data)
throws java.sql.SQLException
sql - the insert statement used to populate the tabledata - the rows to insert into the tablejava.sql.SQLExceptionprivate static java.lang.String[][] cross(java.lang.String[][] t1,
java.lang.String[][] t2)
t1 - the rows in the table on the left sidet2 - the rows in the table on the right sideprivate static java.lang.String[][] project(int[] cols,
java.lang.String[][] rows)
cols - the column indexes (0-based) to projectrows - the rows in the tableprivate static java.lang.String[][] reverse(java.lang.String[][] rows)
rows - the rows in the tablepublic void testUsingClause()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testNaturalJoin()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testSubqueryInON()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testDerby4387()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testDerby_4405()
throws java.sql.SQLException
java.sql.SQLExceptionstatic void insertTourRow(java.sql.PreparedStatement ps,
java.lang.String a,
java.lang.String b)
throws java.sql.SQLException
java.sql.SQLExceptionstatic void insertTourRow(java.sql.PreparedStatement ps,
int a,
java.lang.String b,
java.lang.String c)
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testDerby_4679()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testDerby_4695()
throws java.sql.SQLException
trace-remapping.diff attached to this issue in JIRA and
copmparing the results before and after the rest of the patch is
applied.java.sql.SQLExceptionpublic void testDerby_5933()
throws java.sql.SQLException
java.sql.SQLExceptionApache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.