Skip to content

Commit

Permalink
Add a method to compare SqlInvokedFunction
Browse files Browse the repository at this point in the history
  • Loading branch information
caithagoras0 authored and Rongrong Zhong committed Dec 5, 2019
1 parent 22f70d4 commit f582c6f
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,18 @@ public long getRequiredVersion()
return version.get();
}

public boolean hasSameDefinitionAs(SqlInvokedFunction function)
{
if (function == null) {
throw new IllegalArgumentException("function is null");
}
return Objects.equals(parameters, function.parameters)
&& Objects.equals(description, function.description)
&& Objects.equals(routineCharacteristics, function.routineCharacteristics)
&& Objects.equals(body, function.body)
&& Objects.equals(signature, function.signature);
}

@Override
public boolean equals(Object obj)
{
Expand Down

0 comments on commit f582c6f

Please sign in to comment.