npawar commented on a change in pull request #4870: Add getResultColumnName API
to AggregationFunction to fetch sql compliant result name
URL: https://github.com/apache/incubator-pinot/pull/4870#discussion_r351530958
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/data/table/TableResizer.java
##########
@@ -57,15 +57,18 @@
int numAggregations = aggregationInfos.size();
int numKeyColumns = numColumns - numAggregations;
+ int aggIdx = 0;
Map<String, Integer> columnIndexMap = new HashMap<>();
+ Map<String, AggregationFunction> aggregationColumnToFunction = new
HashMap<>();
for (int i = 0; i < numColumns; i++) {
- columnIndexMap.put(dataSchema.getColumnName(i), i);
- }
-
- Map<String, AggregationInfo> aggregationColumnToInfo = new HashMap<>();
- for (AggregationInfo aggregationInfo : aggregationInfos) {
- String aggregationColumn =
AggregationFunctionUtils.getAggregationColumnName(aggregationInfo);
- aggregationColumnToInfo.put(aggregationColumn, aggregationInfo);
+ String columnName = dataSchema.getColumnName(i).toLowerCase();
Review comment:
Changed this. I ended up making function name lower case in the
AggregationFunction::getResultColumnName, because TransformExpressionTree
converts function names to lower case when building the broker request. Hence
order by only has all lower case function names
----------------------------------------------------------------
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]