yiguolei commented on code in PR #58004:
URL: https://github.com/apache/doris/pull/58004#discussion_r2532672278
##########
be/src/geo/wkb_parse.cpp:
##########
@@ -75,19 +76,21 @@ 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:
这里如果shape == nullptr, 我们返回的似乎还是 GEO_PARSE_OK。 那么上游去调用shape的一些方法时,会不会core?
--
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]