KKcorps opened a new pull request, #16002:
URL: https://github.com/apache/pinot/pull/16002

   This pull request introduces enhancements to the H3 indexing functionality, 
focusing on improved error handling for invalid or null geometries and adding 
corresponding test coverage. The key changes include updates to the 
`BaseH3IndexCreator` and `GeoSpatialIndexCreator` classes, as well as the 
addition of a new test case to validate the behavior.
   
   ### Enhancements to error handling for geometries:
   
   * 
[`BaseH3IndexCreator.java`](diffhunk://#diff-fc821d06c7c68283deebde35f8066ec59f1a7027a7e6ea011a45b6743858be70R109-R127):
 Modified the `deserialize` method to catch exceptions during deserialization 
and return `null` for invalid serialized geometries. Updated the `add` method 
to skip indexing for `null` geometries while incrementing the document ID and 
logging the failure using `ServerMetrics`.
   
   * 
[`GeoSpatialIndexCreator.java`](diffhunk://#diff-e17cfcd9e4693b850863f267d618f8cb8804d64fe13e1ebd3787bb5c9b01b87dL38-R45):
 Updated the default `add` method to handle exceptions during deserialization 
gracefully by treating invalid geometries as `null` and passing them to the 
`add` method.
   
   ### Test coverage for new functionality:
   
   * 
[`H3IndexTest.java`](diffhunk://#diff-0ea94f95fe6ca53944a51cccd85dca927ba21c670efcae330397f9d4d4c44ce7R126-R153):
 Added a new test case, `testSkipNullOrInvalidGeometry`, to verify that invalid 
serialized geometries and explicit `null` geometries are skipped without 
throwing exceptions. The test ensures that valid geometries are still indexed 
correctly.
   
   ### Dependency updates:
   
   * 
[`BaseH3IndexCreator.java`](diffhunk://#diff-fc821d06c7c68283deebde35f8066ec59f1a7027a7e6ea011a45b6743858be70R33-R34):
 Added imports for `ServerMeter` and `ServerMetrics` to facilitate logging of 
indexing failures.


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