Jackie-Jiang commented on code in PR #12697:
URL: https://github.com/apache/pinot/pull/12697#discussion_r1578650162
##########
pinot-spi/src/main/java/org/apache/pinot/spi/stream/RowMetadata.java:
##########
@@ -64,24 +62,34 @@ default long getFirstStreamRecordIngestionTimeMs() {
}
/**
- * Returns the stream message headers
- *
- * @return A {@link GenericRow} that encapsulates the headers in the
ingested row
+ * Returns the stream offset of the message.
+ */
+ @Nullable
Review Comment:
Both historic reason and performance reason:
- Optional was introduced in java 8 (it is handy to be used along with
function APIs), and majority of the code is using `null`
- There could be performance overhead because it is an extra Object wrapper
(24 bytes) over a reference. In majority of the places it doesn't matter, but
checkout this interesting
[post](https://pkolaczk.github.io/overhead-of-optional/)
--
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]