You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/05/15 18:25:46 UTC

[GitHub] [incubator-druid] jihoonson commented on a change in pull request #7633: make ComplexColumn an interface and ExtensionPoint

jihoonson commented on a change in pull request #7633: make ComplexColumn an interface and ExtensionPoint
URL: https://github.com/apache/incubator-druid/pull/7633#discussion_r284390556
 
 

 ##########
 File path: processing/src/main/java/org/apache/druid/segment/column/ComplexColumn.java
 ##########
 @@ -19,45 +19,29 @@
 
 package org.apache.druid.segment.column;
 
+import org.apache.druid.guice.annotations.ExtensionPoint;
 import org.apache.druid.query.monomorphicprocessing.RuntimeShapeInspector;
 import org.apache.druid.segment.ColumnValueSelector;
 import org.apache.druid.segment.ObjectColumnSelector;
-import org.apache.druid.segment.data.GenericIndexed;
 import org.apache.druid.segment.data.ReadableOffset;
 
 import javax.annotation.Nullable;
 
 /**
-*/
-public class ComplexColumn implements BaseColumn
+ */
+@ExtensionPoint
+public interface ComplexColumn extends BaseColumn
 {
-  private final GenericIndexed<?> index;
-  private final String typeName;
+  Class<?> getClazz();
+  String getTypeName();
+  Object getRowValue(int rowNum);
+  int getLength();
 
-  public ComplexColumn(String typeName, GenericIndexed<?> index)
-  {
-    this.index = index;
-    this.typeName = typeName;
-  }
-
-  public String getTypeName()
-  {
-    return typeName;
-  }
-
-  @Nullable
-  public Object getRowValue(int rowNum)
-  {
-    return index.get(rowNum);
-  }
-
-  public int getLength()
-  {
-    return index.size();
-  }
+  @Override
+  void close();
 
   @Override
-  public ColumnValueSelector<?> makeColumnValueSelector(ReadableOffset offset)
+  default ColumnValueSelector makeColumnValueSelector(ReadableOffset offset)
 
 Review comment:
   Why did you remove the wildcard?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org