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 Rui Li committed Apr 23, 2023
1 parent e389753 commit dbc2875
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 dbc2875

Please sign in to comment.