Csaba Ringhofer has submitted this change and it was merged. ( https://gerrit.cloudera.org/25601 )
Change subject: IMPALA-15878: Report empty vs malformed in ComputeWkbBBox() ...................................................................... IMPALA-15878: Report empty vs malformed in ComputeWkbBBox() ComputeWkbBBox() returns the same invalid sentinel box for an empty geometry (e.g. POINT EMPTY) and for WKB that it could not parse. Callers that accumulate a bounding box over many values need to tell the two apart: an empty geometry has no extent and can simply be skipped, while a value that could not be parsed has an unknown extent, so the accumulated box may not cover it. The motivation is IMPALA-15163, where the Parquet writer stores a bounding box of the GEOMETRY values in each row group's statistics. A box that misses a value would make readers skip rows that match, so the writer must write no box if any value could not be bounded, but an empty geometry must not prevent writing one. Add an optional BBoxStatus out-parameter (OK, EMPTY, MALFORMED). It defaults to nullptr, so existing callers are not affected. Also make the unrecognized OGCType case return the sentinel box instead of falling through. Testing: - unit tests for the OK / EMPTY / MALFORMED outcomes in wkb-serialization-test Change-Id: I2c7e404c093dfa47b317a6bdcb81da252f5f8338 Assisted-by: Claude Sonnet 5.5 (Claude Code) Reviewed-on: https://gerrit.cloudera.org/25601 Reviewed-by: Csaba Ringhofer <[email protected]> Tested-by: Csaba Ringhofer <[email protected]> --- M be/src/exprs/geo/wkb-serialization-test.cc M be/src/exprs/geo/wkb-serialization.cc M be/src/exprs/geo/wkb-serialization.h 3 files changed, 108 insertions(+), 7 deletions(-) Approvals: Csaba Ringhofer: Looks good to me, approved; Verified -- To view, visit https://gerrit.cloudera.org/25601 To unsubscribe, visit https://gerrit.cloudera.org/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I2c7e404c093dfa47b317a6bdcb81da252f5f8338 Gerrit-Change-Number: 25601 Gerrit-PatchSet: 6 Gerrit-Owner: Csaba Ringhofer <[email protected]> Gerrit-Reviewer: Csaba Ringhofer <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Jason Fehr <[email protected]>
