From 8dd3041e8875d7a0742a66e0ea7e39318d4f7d87 Mon Sep 17 00:00:00 2001 From: Murphy Date: Thu, 24 Oct 2024 14:10:36 +0800 Subject: [PATCH] remove dead code Signed-off-by: Murphy --- .../sql/optimizer/statistics/Bucket.java | 17 +---------------- .../statistics/StatisticRangeValues.java | 13 ------------- 2 files changed, 1 insertion(+), 29 deletions(-) diff --git a/fe/fe-core/src/main/java/com/starrocks/sql/optimizer/statistics/Bucket.java b/fe/fe-core/src/main/java/com/starrocks/sql/optimizer/statistics/Bucket.java index 8c3fba7690ece..2f0719fb16432 100644 --- a/fe/fe-core/src/main/java/com/starrocks/sql/optimizer/statistics/Bucket.java +++ b/fe/fe-core/src/main/java/com/starrocks/sql/optimizer/statistics/Bucket.java @@ -15,11 +15,9 @@ package com.starrocks.sql.optimizer.statistics; -import org.jetbrains.annotations.NotNull; - import java.util.Objects; -public class Bucket implements Comparable { +public class Bucket { private final double lower; private final double upper; private final Long count; @@ -48,19 +46,6 @@ public Long getUpperRepeats() { return upperRepeats; } - public boolean isOverlapped(Bucket other) { - return Math.min(upper, other.upper) - Math.max(lower, other.lower) >= 0; - } - - @Override - public int compareTo(@NotNull Bucket o) { - int lowerComparison = Double.compare(this.lower, o.lower); - if (lowerComparison != 0) { - return lowerComparison; - } - return Double.compare(this.upper, o.upper); - } - @Override public boolean equals(Object o) { if (this == o) { diff --git a/fe/fe-core/src/main/java/com/starrocks/sql/optimizer/statistics/StatisticRangeValues.java b/fe/fe-core/src/main/java/com/starrocks/sql/optimizer/statistics/StatisticRangeValues.java index 9bf30cffa1cf7..18ca49e6eea97 100644 --- a/fe/fe-core/src/main/java/com/starrocks/sql/optimizer/statistics/StatisticRangeValues.java +++ b/fe/fe-core/src/main/java/com/starrocks/sql/optimizer/statistics/StatisticRangeValues.java @@ -111,19 +111,6 @@ public double overlapPercentWith(@NotNull StatisticRangeValues other) { return StatisticsEstimateCoefficient.OVERLAP_INFINITE_RANGE_FILTER_COEFFICIENT; } - double overlapLength(StatisticRangeValues other) { - if (this.isEmpty() || other.isEmpty()) { - return 0.0; - } - // If the low and high values is infinite, it represents either string type or unknown of column statistics. - if (this.equals(other) && !isBothInfinite()) { - return 1.0; - } - - double lengthOfIntersect = min(this.high, other.high) - max(this.low, other.low); - return lengthOfIntersect; - } - public StatisticRangeValues intersect(StatisticRangeValues other) { double newLow = max(low, other.low); double newHigh = min(high, other.high);