clintropolis commented on a change in pull request #9638:
URL: https://github.com/apache/druid/pull/9638#discussion_r472547376
##########
File path:
processing/src/main/java/org/apache/druid/query/aggregation/post/ExpressionPostAggregator.java
##########
@@ -179,6 +169,14 @@ public String getName()
return name;
}
+ @Override
+ public ValueType getType()
+ {
+ // this is wrong, replace with Expr output type based on the input types
once it is available
+ // but treat as string for now
+ return ValueType.STRING;
Review comment:
Since this is a post-aggregator, probably not a lot will go wrong in
most cases. We will potentially predict an incorrect query result signature as
having strings instead of whatever the actual expression output type is. I
guess it should technically probably return `null` for now since it is truly
unknown, so it will appear in the signature that way. I'm going to consider
making this change.
`COMPLEX` could be ok to use here in some circumstances, but would not be
correct i think for example, if the row signature for a subquery is computed
and then the column from the subquery post-agg is used as an input to another
expression (since expression selectors do not currently handle complex inputs).
There might be other cases too.
----------------------------------------------------------------
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]