silundong commented on code in PR #4392:
URL: https://github.com/apache/calcite/pull/4392#discussion_r2111462658


##########
core/src/main/java/org/apache/calcite/rel/rules/DpHyp.java:
##########
@@ -37,7 +40,12 @@ public class DpHyp {
 
   private final HyperGraph hyperGraph;
 
-  private final HashMap<Long, RelNode> dpTable;
+  private final Map<Long, RelNode> dpTable;
+
+  // record the node order corresponding to the best subgraph, which is used 
to convert
+  // the RexNodeAndFieldIndex in hyperedge to the RexInputRef in join 
condition, and permute
+  // final result
+  private final Map<Long, ImmutableList<Integer>> resultInputOrder;

Review Comment:
   resultInputOrder is the same size as dpTable. I think its size is equal to 
the number of connected components in the hypergraph. This can indeed become 
very large. Is it OK to check its size before putting data into it during 
enumeration (it cannot exceed a certain value, otherwise the enumeration ends)?



-- 
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]

Reply via email to