[fix](nereids) add hashcode and equal to TVFProperties to avoid duplicated error.(#15054)

This commit is contained in:
jakevin
2022-12-16 03:23:27 +08:00
committed by GitHub
parent 5e0d44ff25
commit 52e09e6b04

View File

@ -26,7 +26,9 @@ import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
/** TVFProperties */
/**
* TVFProperties
*/
public class TVFProperties extends Expression implements LeafExpression {
private final Map<String, String> keyValues;
@ -62,4 +64,24 @@ public class TVFProperties extends Expression implements LeafExpression {
public String toString() {
return "TVFProperties(" + toSql() + ")";
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
if (!super.equals(o)) {
return false;
}
TVFProperties that = (TVFProperties) o;
return Objects.equals(keyValues, that.keyValues);
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), keyValues);
}
}