Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenada committed Mar 8, 2025
1 parent ca9582d commit ce22173
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2090,6 +2090,7 @@ public interface Config extends RelRule.Config {
.withOperandSupplier(b -> b.operand(MultiJoin.class).anyInputs());

/** Method to calculate intermediate cost computations. */
@SuppressWarnings("argument.type.incompatible")
@Value.Default default BiFunction<RelOptRuleCall, RelNode, RelOptCost> costFunction() {
return (call, rel) -> call.getMetadataQuery().getCumulativeCost(rel);

Check failure on line 2095 in core/src/main/java/org/apache/calcite/rel/rules/LoptOptimizeJoinRule.java

View workflow job for this annotation

GitHub Actions / CheckerFramework (JDK 11)

[Task :core:compileJava] [return.type.incompatible] incompatible types in return. return (call, rel) -> call.getMetadataQuery().getCumulativeCost(rel); ^ type of expression: @initialized @nullable RelOptCost

Check failure on line 2095 in core/src/main/java/org/apache/calcite/rel/rules/LoptOptimizeJoinRule.java

View workflow job for this annotation

GitHub Actions / CheckerFramework (JDK 11, oldest Guava)

[Task :core:compileJava] [return.type.incompatible] incompatible types in return. return (call, rel) -> call.getMetadataQuery().getCumulativeCost(rel); ^ type of expression: @initialized @nullable RelOptCost
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9749,7 +9749,7 @@ private void checkJoinAssociateRuleWithTopAlwaysTrueCondition(boolean allowAlway
* <a href="https://issues.apache.org/jira/browse/CALCITE-6788">[CALCITE-6788]
* LoptOptimizeJoinRule should be able to delegate costs to the planner</a>. */
@Test void testLoptOptimizeJoinRuleWithSpecialCost() {
// Use and ad-hoc version of the rule that uses planner#getCost instead of mq#getCumulativeCost
// Use an ad-hoc version of the rule that uses planner#getCost instead of mq#getCumulativeCost
checkLoptOptimizeJoinRule(LoptOptimizeJoinRule.Config.DEFAULT
.withCostFunction((c, r) -> c.getPlanner().getCost(r, c.getMetadataQuery()))
.toRule());
Expand Down

0 comments on commit ce22173

Please sign in to comment.