clintropolis commented on a change in pull request #12251:
URL: https://github.com/apache/druid/pull/12251#discussion_r803323195
##########
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:
after further thought i've decided to just always use a virtual column,
even for literals, so this code is simplified a bit now
--
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]