xiangfu0 commented on code in PR #19836:
URL: https://github.com/apache/pinot/pull/19836#discussion_r4267041998
##########
pinot-core/src/main/java/org/apache/pinot/core/common/ObjectSerDeUtils.java:
##########
@@ -329,6 +332,22 @@ public interface ObjectSerDe<T> {
/// Serializes a value into a byte array.
byte[] serialize(T value);
Review Comment:
Centralized the byte-array allocation/wrapping/delegation in the default
implementation in `e18448f960885fcd06c2f8c6e89a122030db19e1`, with the
requested override contract and no explicit negative-size guard. The buffer
default is unchanged.
I retained six one-line typed forwarders calling
`ObjectSerDe.super.serialize(value)`: removing those entry points added exactly
56 B per legacy list/UltraLogLog call (empty lists 24→80 B). The forwarders
restore baseline allocation for homogeneous cases and show no allocation
increase across all 34 cases in three independent JVMs per source, while
removing the duplicate allocation logic. Wire/input parity, 259 focused tests,
and enabled style checks passed.
--
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]