clintropolis commented on a change in pull request #9638:
URL: https://github.com/apache/druid/pull/9638#discussion_r476691553
##########
File path:
processing/src/main/java/org/apache/druid/segment/incremental/IncrementalIndex.java
##########
@@ -1135,21 +1117,21 @@ public MetricDesc(int index, AggregatorFactory factory)
this.index = index;
this.name = factory.getName();
- String typeInfo = factory.getTypeName();
- if ("float".equalsIgnoreCase(typeInfo)) {
- capabilities =
ColumnCapabilitiesImpl.createSimpleNumericColumnCapabilities(ValueType.FLOAT);
- this.type = typeInfo;
- } else if ("long".equalsIgnoreCase(typeInfo)) {
- capabilities =
ColumnCapabilitiesImpl.createSimpleNumericColumnCapabilities(ValueType.LONG);
- this.type = typeInfo;
- } else if ("double".equalsIgnoreCase(typeInfo)) {
- capabilities =
ColumnCapabilitiesImpl.createSimpleNumericColumnCapabilities(ValueType.DOUBLE);
- this.type = typeInfo;
+ ValueType valueType = factory.getType();
+
+ if (valueType.isPrimitive()) {
Review comment:
Changed to handle only numeric and complex types, and left a comment
about what needs done if the new `else` case is encountered.
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]