Skip to content

Commit

Permalink
Implement toString in LimitMatcher
Browse files Browse the repository at this point in the history
The toString is used to construct failure message when plan does not match.
  • Loading branch information
Lewuathe authored and martint committed Feb 19, 2020
1 parent a836ce3 commit de97d15
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

import java.util.List;

import static com.google.common.base.MoreObjects.toStringHelper;
import static com.google.common.base.Preconditions.checkState;
import static io.prestosql.sql.planner.assertions.MatchResult.NO_MATCH;
import static io.prestosql.sql.planner.assertions.MatchResult.match;
Expand Down Expand Up @@ -71,4 +72,14 @@ public MatchResult detailMatches(PlanNode node, StatsProvider stats, Session ses
}
return NO_MATCH;
}

@Override
public String toString()
{
return toStringHelper(this)
.add("limit", limit)
.add("tiesResolvers", tiesResolvers)
.add("partial", partial)
.toString();
}
}

0 comments on commit de97d15

Please sign in to comment.