Skip to content

Commit

Permalink
Add a shortcut equalSansNullability in case the input types are the same
Browse files Browse the repository at this point in the history
  • Loading branch information
vlsi committed Jul 17, 2020
1 parent cdf8678 commit 5462be9
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1202,6 +1202,9 @@ public static boolean equalSansNullability(
* @return true if the types are equal or the only difference is nullability
*/
public static boolean equalSansNullability(RelDataType type1, RelDataType type2) {
if (type1 == type2) {
return true;
}
String x = type1.getFullTypeString();
String y = type2.getFullTypeString();
if (x.length() < y.length()) {
Expand Down

0 comments on commit 5462be9

Please sign in to comment.