You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/07/20 00:25:58 UTC

[GitHub] [pinot] Jackie-Jiang commented on a diff in pull request #9051: Handle unknown magic byte error in Confluent Avro decoder (#9045)

Jackie-Jiang commented on code in PR #9051:
URL: https://github.com/apache/pinot/pull/9051#discussion_r925058997


##########
pinot-spi/src/main/java/org/apache/pinot/spi/stream/StreamMessageDecoder.java:
##########
@@ -52,7 +52,8 @@ void init(Map<String, String> props, Set<String> fieldsToRead, String topicName)
    * Decodes a row.
    *
    * @param payload The buffer from which to read the row.
-   * @return A new row decoded from the buffer
+   * @return A new row decoded from the buffer. If the returned value is <code>null</code> the row is dropped from the
+   *         segment.
    */
   GenericRow decode(T payload, GenericRow destination);

Review Comment:
   Annotate the return as `nullable`
   ```suggestion
     @Nullable
     GenericRow decode(T payload, GenericRow destination);
   ```



##########
pinot-spi/src/main/java/org/apache/pinot/spi/stream/StreamMessageDecoder.java:
##########
@@ -63,7 +64,8 @@ void init(Map<String, String> props, Set<String> fieldsToRead, String topicName)
    * @param offset The offset into the array from which the row contents starts
    * @param length The length of the row contents in bytes
    * @param destination The {@link GenericRow} to write the decoded row into
-   * @return A new row decoded from the buffer
+   * @return A new row decoded from the buffer If the returned value is <code>null</code> the row is dropped from the
+   *         segment.
    */
   GenericRow decode(T payload, int offset, int length, GenericRow destination);

Review Comment:
   Annotate the return as `nullable`



-- 
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-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org