clintropolis commented on code in PR #13378:
URL: https://github.com/apache/druid/pull/13378#discussion_r1024823619
##########
processing/src/main/java/org/apache/druid/query/aggregation/SerializablePairLongStringComplexMetricSerde.java:
##########
@@ -141,9 +168,71 @@ public byte[] toBytes(SerializablePairLongString val)
@Override
public GenericColumnSerializer<?> getSerializer(SegmentWriteOutMedium
segmentWriteOutMedium, String column)
{
- return new SerializablePairLongStringColumnSerializer(
- segmentWriteOutMedium,
- NativeClearedByteBufferProvider.INSTANCE
- );
+ if (compressionEnabled) {
+ return new SerializablePairLongStringColumnSerializer(
+ segmentWriteOutMedium,
+ NativeClearedByteBufferProvider.INSTANCE
+ );
+ } else {
+ return LargeColumnSupportedComplexColumnSerializer.create(
+ segmentWriteOutMedium, column, LEGACY_STRATEGY
+ );
+ }
}
+
+ private static final ObjectStrategy<SerializablePairLongString>
LEGACY_STRATEGY =
Review Comment:
nit: maybe worth leaving a comment about why this is different from
`getObjectStrategy()` here too (sad all big endian all the time, etc)
--
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]