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 2021/11/02 22:16:59 UTC

[GitHub] [druid] clintropolis commented on a change in pull request #11853: complex typed expressions

clintropolis commented on a change in pull request #11853:
URL: https://github.com/apache/druid/pull/11853#discussion_r741500100



##########
File path: core/src/main/java/org/apache/druid/segment/column/Types.java
##########
@@ -112,4 +121,529 @@
     return (typeSignature1 != null && typeSignature1.is(typeDescriptor)) ||
            (typeSignature2 != null && typeSignature2.is(typeDescriptor));
   }
+
+  /**
+   * Get an {@link ObjectByteStrategy} registered to some {@link TypeSignature#getComplexTypeName()}.
+   */
+  @Nullable
+  public static ObjectByteStrategy<?> getStrategy(String type)
+  {
+    return STRATEGIES.get(type);
+  }
+
+  /**
+   * hmm... this might look familiar... (see ComplexMetrics)
+   *
+   * Register a complex type name -> {@link ObjectByteStrategy} mapping.
+   *
+   * If the specified type name or type id are already used and the supplied {@link ObjectByteStrategy} is not of the
+   * same type as the existing value in the map for said key, an {@link ISE} is thrown.
+   *
+   * @param strategy The {@link ObjectByteStrategy} object to be associated with the 'type' in the map.
+   */

Review comment:
       hmm, I don't think we really make an attempt to make it very friendly to read outside of the source code - this is maybe worth doing but I think will leave for now to be consistent




-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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