jihoonson commented on a change in pull request #12250:
URL: https://github.com/apache/druid/pull/12250#discussion_r808379545



##########
File path: 
processing/src/main/java/org/apache/druid/segment/serde/ColumnPartSerde.java
##########
@@ -39,13 +41,23 @@
     @JsonSubTypes.Type(name = "floatV2", value = 
FloatNumericColumnPartSerdeV2.class),
     @JsonSubTypes.Type(name = "longV2", value = 
LongNumericColumnPartSerdeV2.class),
     @JsonSubTypes.Type(name = "doubleV2", value = 
DoubleNumericColumnPartSerdeV2.class),
+    @JsonSubTypes.Type(name = "null", value = NullColumnPartSerde.class)
 })
 public interface ColumnPartSerde
 {
   @Nullable
   Serializer getSerializer();
 
-  Deserializer getDeserializer();
+  /**
+   * Returns a Deserializer to read a column from a segment.
+   *
+   * @param rowCountSupplier          a supplier that returns the row count of 
the segment that the column belongs to.
+   *                                  Getting from the supplier the row count 
can be expensive and thus should be
+   *                                  evaluated lazily.
+   * @param segmentBitmapSerdeFactory bitmapSerdeFactory stored in the 
segment. Each columnPartSerde may have their own
+   *                                  bitmapSerdeFactory.
+   */
+  Deserializer getDeserializer(IntSupplier rowCountSupplier, 
BitmapSerdeFactory segmentBitmapSerdeFactory);

Review comment:
       > these things are basically part of the `ColumnPartSerde` when it is 
created (and the bitmap serde factory is shared across all columns via the 
index spec)
   
   Actually, this is the reason that I pass `segmentBitmapSerdeFactory` in. 
Even though the bitmapSerdeFacotry is shared across all columns, each column 
stores it again in its columnPartSerde which is duplicate with the 
bitmapSerdeFactory stored in the segment. This seems unnecessary and I wanted 
to avoid it for `NullColumnPartSerde`.




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