hsyuan commented on a change in pull request #1567: [CALCITE-3479] Stack
overflow error thrown when running join query
URL: https://github.com/apache/calcite/pull/1567#discussion_r343947366
##########
File path: core/src/test/java/org/apache/calcite/test/ScannableTableTest.java
##########
@@ -363,6 +364,30 @@ private static Integer getFilter(boolean cooperative,
List<RexNode> filters) {
assertThat(buf.toString(), is("returnCount=4, projects=[2, 0]"));
}
+ /** Test case for
+ * <a
href="https://issues.apache.org/jira/browse/CALCITE-3479">[CALCITE-3479]
+ * Stack overflow error thrown when running join query</a>
+ * Test two ProjectableFilterableTable can join and produce right plan.
+ */
+ @Test public void testProjectableFilterableTableJoin() throws Exception {
+ final StringBuilder buf = new StringBuilder();
+ final String explain = "PLAN="
+ + "EnumerableHashJoin(condition=[=($0, $3)], joinType=[inner])\n"
+ + " EnumerableInterpreter\n"
+ + " BindableTableScan(table=[[s, b1]], filters=[[=($0, 10)]])\n"
+ + " EnumerableInterpreter\n"
+ + " BindableTableScan(table=[[s, b2]], filters=[[=($0, 10)]])";
+ CalciteAssert.that()
+ .with(
+ newSchema("s",
+ Pair.of("b1", new BeatlesProjectableFilterableTable(buf,
true)),
Review comment:
Can this table be shared?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services