Copilot commented on code in PR #17798:
URL: https://github.com/apache/pinot/pull/17798#discussion_r2875545602


##########
pinot-plugins/pinot-input-format/pinot-avro/src/main/java/org/apache/pinot/plugin/inputformat/avro/KafkaAvroMessageDecoder.java:
##########
@@ -142,25 +142,25 @@ public GenericRow decode(byte[] payload, int offset, int 
length, GenericRow dest
       return null;
     }
 
-    System.arraycopy(payload, SCHEMA_HASH_START_OFFSET + offset, 
_reusableMD5Bytes, 0, SCHEMA_HASH_LENGTH);
+    System.arraycopy(payload, SCHEMA_HASH_START_OFFSET + offset, 
_reusableSchemaHashBytes, 0, SCHEMA_HASH_LENGTH);
 
     boolean schemaUpdateFailed = false;
-    org.apache.avro.Schema schema = 
_md5ToAvroSchemaMap.getSchema(_reusableMD5Bytes);
+    org.apache.avro.Schema schema = 
_schemaHashToAvroSchemaMap.getSchema(_reusableSchemaHashBytes);
     if (schema == null) {
       // We will get here for the first row consumed in the segment, and every 
row that has a schema ID that is
-      // not yet in md5ToAvroSchemaMap.
+      // not yet in schemaHashToAvroSchemaMap.
       synchronized (GLOBAL_SCHEMA_CACHE) {
-        final String hashKey = hex(_reusableMD5Bytes);
+        final String hashKey = hex(_reusableSchemaHashBytes);
         schema = GLOBAL_SCHEMA_CACHE.get(hashKey);
         if (schema == null) {
           // We will get here only if no partition of the table has populated 
the global schema cache.
           // In that case, one of the consumers will fetch the schema and 
populate the cache, and the others
           // should find it in the cache and po

Review Comment:
   The inline comment appears truncated (ends with "...and po"), which makes it 
hard to understand. Please fix the wording (complete the sentence or remove the 
fragment).
   ```suggestion
             // should find it in the cache and populate their local schema 
maps.
   ```



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

Reply via email to