LuciferYang commented on PR #55924: URL: https://github.com/apache/spark/pull/55924#issuecomment-5512396854
Minor point on the new offset/length overloads: `readGeometry` only validates `length >= 1` before `ByteBuffer.wrap`, so a negative offset or an `offset + length` past the array end escapes as a raw `IndexOutOfBoundsException` that `fromWkb`'s `WkbParseException` catch never sees, while every other kind of malformed WKB surfaces as `WKB_PARSE_ERROR`. In-repo callers all pass valid ranges today, so this is just about the contract of the new public API. Could you validate `offset` and `offset + length` before the wrap and throw a positioned `WkbParseException` instead? -- 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]
