mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 03:58:14 +00:00
(fix)(headless)Fix hash code issue of MetricSchemaResp and DimensionSchemaResp.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package com.tencent.supersonic.headless.api.pojo;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.tencent.supersonic.common.pojo.RecordInfo;
|
||||
import com.tencent.supersonic.common.pojo.enums.SensitiveLevelEnum;
|
||||
import com.tencent.supersonic.common.pojo.enums.TypeEnums;
|
||||
@@ -10,6 +9,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
@@ -40,13 +40,13 @@ public class SchemaItem extends RecordInfo {
|
||||
return false;
|
||||
}
|
||||
SchemaItem that = (SchemaItem) o;
|
||||
return Objects.equal(id, that.id) && Objects.equal(name, that.name)
|
||||
&& Objects.equal(bizName, that.bizName) && typeEnum == that.typeEnum;
|
||||
return Objects.equals(id, that.id) && Objects.equals(name, that.name)
|
||||
&& Objects.equals(bizName, that.bizName) && typeEnum == that.typeEnum;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(id, name, bizName, typeEnum);
|
||||
return Objects.hash(id, name, bizName, typeEnum);
|
||||
}
|
||||
|
||||
public static List<String> getAliasList(String alias) {
|
||||
|
||||
@@ -53,4 +53,15 @@ public class DimensionResp extends SchemaItem {
|
||||
public boolean isPartitionTime() {
|
||||
return DimensionType.isPartitionTime(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return super.hashCode();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,10 +10,7 @@ import lombok.ToString;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Data
|
||||
@@ -118,4 +115,15 @@ public class MetricResp extends SchemaItem {
|
||||
public boolean isDerived() {
|
||||
return MetricType.isDerived(metricDefineType, metricDefineByMeasureParams);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return super.hashCode();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user