leventov commented on a change in pull request #8209: add mechanism to control filter optimization in historical query processing URL: https://github.com/apache/incubator-druid/pull/8209#discussion_r311670420
########## File path: processing/src/main/java/org/apache/druid/query/filter/BoundDimFilter.java ########## @@ -263,43 +290,30 @@ public boolean equals(Object o) if (o == null || getClass() != o.getClass()) { return false; } - BoundDimFilter that = (BoundDimFilter) o; - - if (isLowerStrict() != that.isLowerStrict()) { - return false; - } - if (isUpperStrict() != that.isUpperStrict()) { - return false; - } - if (!getDimension().equals(that.getDimension())) { - return false; - } - if (getUpper() != null ? !getUpper().equals(that.getUpper()) : that.getUpper() != null) { - return false; - } - if (getLower() != null ? !getLower().equals(that.getLower()) : that.getLower() != null) { - return false; - } - if (getExtractionFn() != null - ? !getExtractionFn().equals(that.getExtractionFn()) - : that.getExtractionFn() != null) { - return false; - } - return getOrdering().equals(that.getOrdering()); + return lowerStrict == that.lowerStrict && + upperStrict == that.upperStrict && + dimension.equals(that.dimension) && + Objects.equals(upper, that.upper) && + Objects.equals(lower, that.lower) && + Objects.equals(extractionFn, that.extractionFn) && + Objects.equals(ordering, that.ordering) && + Objects.equals(filterTuning, that.filterTuning); } @Override public int hashCode() { - int result = getDimension().hashCode(); - result = 31 * result + (getUpper() != null ? getUpper().hashCode() : 0); - result = 31 * result + (getLower() != null ? getLower().hashCode() : 0); - result = 31 * result + (isLowerStrict() ? 1 : 0); - result = 31 * result + (isUpperStrict() ? 1 : 0); - result = 31 * result + (getExtractionFn() != null ? getExtractionFn().hashCode() : 0); - result = 31 * result + getOrdering().hashCode(); - return result; + return Objects.hash( + dimension, + upper, + lower, + lowerStrict, + upperStrict, + extractionFn, + ordering, + filterTuning + ); } @Override Review comment: Thanks for this refactoring ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org For additional commands, e-mail: commits-h...@druid.apache.org