Skip to content

Commit

Permalink
[trinodb#190]: Class FunctionType overrides hashCode/equals
Browse files Browse the repository at this point in the history
  • Loading branch information
冯广远 authored and rice668 committed Dec 14, 2022
1 parent 52fda21 commit ea0d922
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions core/trino-main/src/main/java/io/trino/type/FunctionType.java
Original file line number Diff line number Diff line change
Expand Up @@ -196,4 +196,24 @@ public BlockBuilder createBlockBuilder(BlockBuilderStatus blockBuilderStatus, in
{
throw new UnsupportedOperationException();
}

@Override
public boolean equals(Object o)
{
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}

FunctionType that = (FunctionType) o;
return signature.equals(that.signature);
}

@Override
public int hashCode()
{
return signature.hashCode();
}
}

0 comments on commit ea0d922

Please sign in to comment.