You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2022/12/15 19:23:33 UTC
[doris] branch master updated: [fix](nereids) add `hashcode` and `equal` to TVFProperties to avoid duplicated error.(#15054)
This is an automated email from the ASF dual-hosted git repository.
morrysnow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 52e09e6b04 [fix](nereids) add `hashcode` and `equal` to TVFProperties to avoid duplicated error.(#15054)
52e09e6b04 is described below
commit 52e09e6b04fdc79f74af620ebda7e290bd051e55
Author: jakevin <ja...@gmail.com>
AuthorDate: Fri Dec 16 03:23:27 2022 +0800
[fix](nereids) add `hashcode` and `equal` to TVFProperties to avoid duplicated error.(#15054)
---
.../nereids/trees/expressions/TVFProperties.java | 24 +++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/TVFProperties.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/TVFProperties.java
index 78992add63..3a7c2f656b 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/TVFProperties.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/TVFProperties.java
@@ -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);
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org