Jackie-Jiang commented on code in PR #9077:
URL: https://github.com/apache/pinot/pull/9077#discussion_r925970719
##########
pinot-core/src/main/java/org/apache/pinot/core/util/SegmentProcessorAvroUtils.java:
##########
@@ -74,7 +74,10 @@ public static GenericData.Record
convertGenericRowToAvroRecord(GenericRow generi
public static Schema
convertPinotSchemaToAvroSchema(org.apache.pinot.spi.data.Schema pinotSchema) {
SchemaBuilder.FieldAssembler<org.apache.avro.Schema> fieldAssembler =
SchemaBuilder.record("record").fields();
- for (FieldSpec fieldSpec : pinotSchema.getAllFieldSpecs()) {
+ List<FieldSpec> orderedFieldSpecs = pinotSchema.getAllFieldSpecs().stream()
+ .sorted()
Review Comment:
Good catch! Here we want to order the fields by name. `FieldSpec` itself is
not comparable
--
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]