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

Reply via email to