Skip to content

Commit

Permalink
[CALCITE-4426] Short-circuit evaluating when comparing two "RelTraitS…
Browse files Browse the repository at this point in the history
…et"s (Jiatao Tao)
  • Loading branch information
Aaaaaaron authored and amaliujia committed Feb 5, 2021
1 parent c475124 commit d21d540
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/src/main/java/org/apache/calcite/plan/RelTraitSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,9 @@ public <T extends RelTrait> T canonize(T trait) {
* @see org.apache.calcite.plan.RelTrait#satisfies(RelTrait)
*/
public boolean satisfies(RelTraitSet that) {
if (this == that) {
return true;
}
final int n =
Math.min(
this.size(),
Expand Down

0 comments on commit d21d540

Please sign in to comment.