silundong commented on code in PR #4392:
URL: https://github.com/apache/calcite/pull/4392#discussion_r2111467661
##########
core/src/main/java/org/apache/calcite/rel/rules/HyperGraph.java:
##########
@@ -401,69 +453,67 @@ public RexNode extractJoinCond(RelNode left, RelNode
right, List<HyperEdge> edge
};
for (HyperEdge edge : edges) {
- RexNode inputRefCond =
edge.getCondition().accept(inputName2InputRefShuttle);
+ RexNode inputRefCond = edge.getCondition().accept(shuttle);
joinConds.add(inputRefCond);
}
- return RexUtil.composeConjunction(left.getCluster().getRexBuilder(),
joinConds);
+ return RexUtil.composeConjunction(getCluster().getRexBuilder(), joinConds);
Review Comment:
No, there is no constraint on the original join condition in the code. When
constructing the hypergraph in the `JoinToHyperGraphRule`, for the original
Join, I separated its join condition according to `AND`, each item can be used
as a hyperedge, and I replaced `RexInputRef` in the expression with
`RexNodeAndFieldIndex`. When enumerating the csg-cmp pair, I need to find all
the hyperedges connecting them, restore the `RexNodeAndFieldIndex` in it to
`RexInputRef`, and then form a conjunction as the join condition to construct
the Join.
--
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]