HappenLee commented on code in PR #46661: URL: https://github.com/apache/doris/pull/46661#discussion_r1915987440
########## be/src/geo/geo_types.cpp: ########## @@ -316,13 +326,23 @@ bool GeoPoint::decode(const void* data, size_t size) { } double GeoPoint::x() const { - //Accurate to 13 decimal places - return std::stod(absl::StrFormat("%.13f", S2LatLng::Longitude(*_point).degrees())); + double value = S2LatLng::Longitude(*_point).degrees(); + // Handle values very close to integers + double rounded = round(value); + if (std::abs(value - rounded) < 1e-13) { // 使用更大的阈值 Review Comment: please use english, thank you -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org