clintropolis commented on a change in pull request #12251:
URL: https://github.com/apache/druid/pull/12251#discussion_r803304066
##########
File path:
sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/AvgSqlAggregator.java
##########
@@ -115,9 +115,13 @@ public Aggregation toDruidAggregation(
project,
Iterables.getOnlyElement(aggregateCall.getArgList())
);
- String vc = virtualColumnRegistry.getVirtualColumnByExpression(arg,
resolutionArg.getType());
- fieldName = vc != null ? vc : null;
- expression = vc != null ? null : arg.getExpression();
+ if (arg.getType() == DruidExpression.NodeType.LITERAL) {
Review comment:
i did consolidate this into a static method in `SimpleSqlAggregator`
while you were typing this comment, I haven't really decided on baking it into
`VirtualColumnRegistry` in some way yet though, will think about it some more.
--
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]