linrrzqqq commented on code in PR #58004:
URL: https://github.com/apache/doris/pull/58004#discussion_r2548970657
##########
be/src/geo/wkb_parse.cpp:
##########
@@ -75,19 +76,23 @@ unsigned char ASCIIHexToUChar(char val) {
}
}
-GeoParseStatus WkbParse::parse_wkb(std::istream& is, GeoShape** shape) {
+GeoParseStatus WkbParse::parse_wkb(std::istream& is,
std::unique_ptr<GeoShape>& shape) {
WkbParseContext ctx;
- ctx = *(WkbParse::read_hex(is, &ctx));
+ WkbParse::read_hex(is, ctx);
if (ctx.parse_status == GEO_PARSE_OK) {
- *shape = ctx.shape;
+ if (ctx.shape != nullptr) {
Review Comment:
后面的`read`函数保证 parse 结果不为空指针,所以这里的判断也是没必要的, fixed
--
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]