LakshSingla commented on code in PR #16620:
URL: https://github.com/apache/druid/pull/16620#discussion_r1663917371
##########
processing/src/main/java/org/apache/druid/query/groupby/GroupByQueryQueryToolChest.java:
##########
@@ -727,13 +715,20 @@ public ResultRow apply(Object input)
int dimPos = 0;
while (dimsIter.hasNext() && results.hasNext()) {
final DimensionSpec dimensionSpec = dimsIter.next();
+ final Object dimensionObject = results.next();
+ final Object dimensionObjectCasted;
// Must convert generic Jackson-deserialized type into the
proper type.
- resultRow.set(
- dimensionStart + dimPos,
- DimensionHandlerUtils.convertObjectToType(results.next(),
dimensionSpec.getOutputType())
- );
-
+ if (dimensionSpec.getOutputType().is(ValueType.COMPLEX)) {
Review Comment:
> because convertValue looks pretty expensive.
That sounds reasonable.
Maybe as an alternative, what if we return `Object.class` instead of
`StructuredValue.class` for `jsonStrategy.getClazz()`? I assume that
convertValue should short-circuit in that case - converting it from an object
to object. If that's the case, we'd get away with special handling (perhaps).
--
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]