Kikyou1997 opened a new pull request, #18571:
URL: https://github.com/apache/doris/pull/18571

   # Proposed changes
   
   Since the goals of `ColumnStatistic#coverage` function is determine whether 
the build side range is complete enclose the range of probe side, if so, and 
the comment explained, corresponding runtime filter might be thought as useless 
and get pruned.
   
   Howerver, the original logic of this method is quite confused.
   
   Simplify its logic by this formula:
   
   ```java
   (Math.min(maxValue, other.maxValue) - Math.max(minValue, other.minValue)) < 
(maxValue - minValue)
   ```
   
   Provement:
   
   1. If range of probe side is completely enclosed be build side, 
Math.min(maxValue, other.maxValue) - Math.max(minValue, other.minValue)) ==  
(maxValue - minValue), condition isn't got satisfied that match our expectation
   2. If range of probe side is partly overlapped with build side, 
Math.min(maxValue, other.maxValue) - Math.max(minValue, other.minValue)) <  
(maxValue - minValue), condition is got satisfied that match our expectation
   3. If range of probe side is disjoint with build side, Math.min(maxValue, 
other.maxValue) - Math.max(minValue, other.minValue)) < 0, condition is got 
satisfied that match our expectation
   
   ## Problem summary
   
   Describe your changes.
   
   ## Checklist(Required)
   
   * [ ] Does it affect the original behavior
   * [ ] Has unit tests been added
   * [ ] Has document been added or modified
   * [ ] Does it need to update dependencies
   * [ ] Is this PR support rollback (If NO, please explain WHY)
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at 
[[email protected]](mailto:[email protected]) by explaining why you 
chose the solution you did and what alternatives you considered, etc...
   
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to