Open TheWinds opened 2 years ago
Thanks for reporting this. What is the edgeLength
for your H3 index? Based on the visualization, I think (int) Math.floor((distance / _edgeLength - 2) / 1.7321)
should be 0
(distance should be less than (2 + 1.7321) * _edgeLength
).
Thanks for reporting this. What is the
edgeLength
for your H3 index? Based on the visualization, I think(int) Math.floor((distance / _edgeLength - 2) / 1.7321)
should be0
(distance should be less than(2 + 1.7321) * _edgeLength
).
The _edgeLength of resolution 7
is 1220.629759
Math.floor(( 5000 / 1220.629759 - 2 ) / 1.7321) == 1
You can click this link to see the visualize result https://codepen.io/jsthewinds/pen/GRvwXoe
and the center point is dragable , drag it or modify config params to obverse it.
I somehow feel the _edgeLength
is not accurate. Based on the visualization, the diameter of the circle should be less than 7 * _edgeLength
, but 10000 > 8 * 1220.629759
Adding @yupeng9
When using the H3 index, in some cases, the correct filtering of distances is not possible.
Test case
Data
geodata.csv
schema
table
Query
Query Response
Analysis
**This appears to be a problem with KRing calculations***
Code
https://github.com/apache/pinot/blob/e3d238ac1d8633331d9507713266e41e6b40f870/pinot-core/src/main/java/org/apache/pinot/core/operator/filter/H3IndexFilterOperator.java#L186-L198
Visualize