Skip to content

Commit

Permalink
Test to repro ArrayIndexOutOfBoundsException on query with in clause …
Browse files Browse the repository at this point in the history
…on indexed table
  • Loading branch information
Mujtaba committed Feb 5, 2014
1 parent 974ad58 commit c2a7b23
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -751,4 +751,23 @@ public void testIndexWithCaseSensitiveCols() throws Exception {
conn.close();
}
}

@Test
public void testInFilterOnIndexedTable() throws Exception {
Properties props = new Properties(TEST_PROPERTIES);
Connection conn = DriverManager.getConnection(getUrl(), props);
conn.setAutoCommit(false);
try {
String ddl = "CREATE TABLE TEST (PK1 CHAR(2) NOT NULL PRIMARY KEY, CF1.COL1 BIGINT)";
conn.createStatement().execute(ddl);
ddl = "CREATE INDEX IDX1 ON TEST (COL1)";
conn.createStatement().execute(ddl);

String query = "SELECT COUNT(COL1) FROM TEST WHERE COL1 IN (1,25,50,75,100)";
ResultSet rs = conn.createStatement().executeQuery(query);
assertTrue(rs.next());
} finally {
conn.close();
}
}
}

0 comments on commit c2a7b23

Please sign in to comment.