clintropolis commented on a change in pull request #9429: fix issue when
distinct grouping dimensions are optimized into the same virtual column
expression
URL: https://github.com/apache/druid/pull/9429#discussion_r385425359
##########
File path:
sql/src/main/java/org/apache/druid/sql/calcite/aggregation/DimensionExpression.java
##########
@@ -28,6 +28,7 @@
public class DimensionExpression
{
+ private final String inputDimension;
Review comment:
Heh, I initially had it named `inputColumn` but changed to `inputDimension`
to match the `DimensionSpec` which it creates.
However, since this field _actually_ is only used when creating a
`DimensionSpec` when the `DimensionExpression` is for a virtual column, I have
renamed the field to `virtualColumn`. When a `DimensionExpression` is a direct
access or simple extraction, we use
`expression.getSimpleExtraction().toDimensionSpec` to craft the `DimensionSpec`
instead, so this field is ignored.
To help clarify this, i collapsed the constructors into a single private
constructor and made static methods `DimensionExpression.ofSimpleColumn` and
`DimensionExpression.ofVirtualColumn` for creating the two types of
`DimensionExpression` we have, as per your other comment, which I think helps
clear up usage.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]