bziobrowski commented on code in PR #15349:
URL: https://github.com/apache/pinot/pull/15349#discussion_r2020856322


##########
pinot-core/src/main/java/org/apache/pinot/core/geospatial/transform/function/ScalarFunctions.java:
##########
@@ -267,4 +268,23 @@ public static long gridDistance(long firstH3Index, long 
secondH3Index) {
     }
     return H3Utils.H3_CORE.gridDistance(firstH3Index, secondH3Index);
   }
+
+  /**
+   * Returns all H3 indexes within a specified hexagonal grid distance from a 
given origin index. The function considers
+   * hexagonal traversal rules and accounts for wrapping around pentagons.
+   *
+   * @param origin The starting H3 index from which to compute the grid disk.
+   * @param k      The radius of the disk in hexagonal grid steps.
+   * @return An array of H3 indexes within the specified distance from the 
origin.
+   */

Review Comment:
   @Jackie-Jiang @ashishjayamohan This function lets user trigger OOM easily 
because no limit is put on how big diskCells can get. It's easy to make it 
allocate ~ 2*10^9 Longs per row. 
   I'd suggest adding a configurable limit.
   



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to