koi2000 commented on code in PR #48695:
URL: https://github.com/apache/doris/pull/48695#discussion_r1991067521
##########
be/src/vec/functions/functions_geo.cpp:
##########
@@ -672,43 +674,37 @@ struct StContains {
break;
}
}
-
- if (i == 2) {
- auto contains_value = shapes[0]->contains(shapes[1].get());
- res->insert_data(const_cast<const char*>((char*)&contains_value),
0);
- }
+ auto relation_value = Func::evaluate(shapes[0].get(), shapes[1].get());
+ res->insert_data(const_cast<const char*>((char*)&relation_value), 0);
Review Comment:
The mutable_ptr type does not support the [] operator. res already reserves
space, insert_data does not result in a memory allocation.
--
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]