use virtual columns for sql simple aggregators instead of inline expressions (#12251)
authorClint Wylie <cwylie@apache.org>
Thu, 3 Mar 2022 23:05:28 +0000 (15:05 -0800)
committerGitHub <noreply@github.com>
Thu, 3 Mar 2022 23:05:28 +0000 (15:05 -0800)
commit1c004ea47e3eeacc7d7379b34a825019b6709948
treef9ccbc4dd07beeacbddbe6c733526608792a22cb
parent36193955b6d8a03fe247157dddebea0365c7e501
use virtual columns for sql simple aggregators instead of inline expressions (#12251)

* use virtual columns for sql simple aggregators instead of inline expressions

* fixes

* always use virtual columns

* add more tests
13 files changed:
processing/src/test/java/org/apache/druid/query/groupby/GroupByQueryRunnerTest.java
sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/AvgSqlAggregator.java
sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/MaxSqlAggregator.java
sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/MinSqlAggregator.java
sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/SimpleSqlAggregator.java
sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/SumSqlAggregator.java
sql/src/main/java/org/apache/druid/sql/calcite/expression/BinaryOperatorConversion.java
sql/src/main/java/org/apache/druid/sql/calcite/expression/DruidExpression.java
sql/src/main/java/org/apache/druid/sql/calcite/expression/OperatorConversions.java
sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/MultiValueStringOperatorConversions.java
sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/StrposOperatorConversion.java
sql/src/main/java/org/apache/druid/sql/calcite/rel/VirtualColumnRegistry.java
sql/src/test/java/org/apache/druid/sql/calcite/CalciteQueryTest.java