clintropolis commented on code in PR #18948:
URL: https://github.com/apache/druid/pull/18948#discussion_r2723114825
##########
processing/src/main/java/org/apache/druid/segment/nested/CompressedNestedDataComplexColumn.java:
##########
@@ -1043,8 +1044,17 @@ public boolean isNumeric(List<NestedPathPart> path)
if (field instanceof NestedField) {
final NestedField nestedField = (NestedField) field;
return getColumnHolder(nestedField.fieldName,
nestedField.fieldIndex).getCapabilities().isNumeric();
+ } else if (field instanceof NestedArrayElement) {
+ final NestedArrayElement element = (NestedArrayElement) field;
+ final TypeSignature<ValueType> elementType = getColumnHolder(
+ element.nestedField.fieldName,
+ element.nestedField.fieldIndex
+ ).getCapabilities().getElementType();
+ if (elementType != null) {
+ return elementType.isNumeric();
+ }
}
- return true;
+ return field == null;
Review Comment:
I guess i was thinking that if we ever add any other types of path parts
here then they will default to 'not numeric' instead of 'numeric'
--
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]