HappenLee commented on code in PR #58004:
URL: https://github.com/apache/doris/pull/58004#discussion_r2544528921


##########
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:
   parse 成功也可能是空指针,这里看原来的代码不是这个逻辑,而且read_hex里有问题也会设置成GEO_PARSE_WKT_SYNTAX_ERROR 
,所以为什么要多设置和check一次



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

Reply via email to