eldenmoon commented on code in PR #30906:
URL: https://github.com/apache/doris/pull/30906#discussion_r1480795355
##########
be/src/olap/tablet_schema.cpp:
##########
@@ -1382,4 +1386,13 @@ bool operator!=(const TabletSchema& a, const
TabletSchema& b) {
return !(a == b);
}
+std::string TabletSchema::deterministic_string_serialize(const TabletSchemaPB&
schema_pb) {
+ std::string output;
+ google::protobuf::io::StringOutputStream string_output_stream(&output);
+ google::protobuf::io::CodedOutputStream
output_stream(&string_output_stream);
+ output_stream.SetSerializationDeterministic(true);
Review Comment:
Yes , map serialization is none deterministic by default, and
`SetSerializationDeterministic` to true will make it deterministic.From the
document above `This means that for a given binary equal messages will always
be serialized to the same bytes`.
I've also tested and it's deterministic as expected
--
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]