AlexanderSaydakov commented on a change in pull request #5712: HllSketch module
URL: https://github.com/apache/incubator-druid/pull/5712#discussion_r218563251
 
 

 ##########
 File path: 
extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/hll/HllSketchBuildComplexMetricSerde.java
 ##########
 @@ -19,57 +19,16 @@
 
 package org.apache.druid.query.aggregation.datasketches.hll;
 
-import java.nio.ByteBuffer;
-
-import org.apache.druid.data.input.InputRow;
-import org.apache.druid.segment.column.ColumnBuilder;
-import org.apache.druid.segment.data.GenericIndexed;
-import org.apache.druid.segment.data.ObjectStrategy;
-import org.apache.druid.segment.serde.ComplexColumnPartSupplier;
+import org.apache.druid.query.aggregation.datasketches.RawInputValueExtractor;
 import org.apache.druid.segment.serde.ComplexMetricExtractor;
-import org.apache.druid.segment.serde.ComplexMetricSerde;
 
-public class HllSketchBuildComplexMetricSerde extends ComplexMetricSerde
+public class HllSketchBuildComplexMetricSerde extends 
HllSketchMergeComplexMetricSerde
 {
 
-  @Override
-  public String getTypeName()
-  {
-    return HllSketchModule.TYPE_NAME; // must be common type name
-  }
-
-  @Override
-  public ObjectStrategy getObjectStrategy()
-  {
-    return HllSketchObjectStrategy.STRATEGY;
-  }
-
   @Override
   public ComplexMetricExtractor getExtractor()
   {
-    return new ComplexMetricExtractor()
-    {
-      @Override
-      public Class<?> extractedClass()
-      {
-        return Object.class;
-      }
-
-      @Override
-      public Object extractValue(final InputRow inputRow, final String 
metricName)
-      {
-        return inputRow.getRaw(metricName);
-      }
-    };
-  }
-
-  @Override
-  public void deserializeColumn(final ByteBuffer buf, final ColumnBuilder 
columnBuilder)
 
 Review comment:
   it was identical to one in Merge Serde (with some other identical methods), 
so I made this class a subclass of that (just like in other modules).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to