jinfengni commented on code in PR #3640:
URL: https://github.com/apache/calcite/pull/3640#discussion_r1499577112
##########
core/src/test/java/org/apache/calcite/test/JdbcTest.java:
##########
@@ -8270,6 +8270,75 @@ private void checkGetTimestamp(Connection con) throws
SQLException {
.returns("EXPR$0=[1, 1.1]\n");
}
+ /** Test case for
+ * <a
href="https://issues.apache.org/jira/browse/CALCITE-6032">[CALCITE-6032]
+ * NullPointerException in Reldecorrelator for a Multi level correlated
subquery</a>. */
+ @Test void testMultiLevelDecorrelation() throws Exception {
+ String hsqldbMemUrl = "jdbc:hsqldb:mem:.";
+ Connection baseConnection = DriverManager.getConnection(hsqldbMemUrl);
+ Statement baseStmt = baseConnection.createStatement();
+ baseStmt.execute("create table invoice (inv_id integer, col1\n"
+ + "integer, inv_amt integer)");
+ baseStmt.execute("create table item(item_id integer, item_amt\n"
Review Comment:
Will it be better to use some existing table/schemas to reproduce this
problem? For instance, the `hr` or `foodmart` schema?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]