I have had this happen numerous times when writing new planner rules. Most of the time my rule is missing some boolean logic to prevent itself from transforming the call. This results in the rule continuously transforming it's previous transformations.
I can usually see this happening when I add a System.out.println(RelOptUtil.dumpPlan()) to the line before the call.transformTo(newRelationNode) On Mon, Apr 20, 2020 at 3:13 AM JiaTao Tao <taojia...@gmail.com> wrote: > Hi > Has anyone encountered this problem before? Just a simple query(no more > than 20 lines, two joins, no union). > > And I see this ticket: https://issues.apache.org/jira/browse/CALCITE-2057, > but there's no follow up, also I see flink may occur this problem( > https://developer.aliyun.com/ask/129548) > > java.lang.StackOverflowError > at java.util.HashMap.hash(HashMap.java:339) > at java.util.HashMap.put(HashMap.java:612) > at > com.google.common.collect.StandardTable.getOrCreate(StandardTable.java:165) > at com.google.common.collect.StandardTable.put(StandardTable.java:174) > at com.google.common.collect.HashBasedTable.put(HashBasedTable.java:55) > at GeneratedMetadataHandler_RowCount.getRowCount(Unknown Source) > at > org.apache.calcite.rel.metadata.RelMetadataQuery.getRowCount(RelMetadataQuery.java:208) > at > org.apache.calcite.rel.metadata.RelMdRowCount.getRowCount(RelMdRowCount.java:72) > at GeneratedMetadataHandler_RowCount.getRowCount_$(Unknown Source) > at GeneratedMetadataHandler_RowCount.getRowCount(Unknown Source) > at ... > > Regards! > > Aron Tao >