yashmayya commented on code in PR #17143:
URL: https://github.com/apache/pinot/pull/17143#discussion_r2495775009
##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/EmptyResponseUtils.java:
##########
@@ -61,10 +61,15 @@ public static ResultTable
buildEmptyResultTable(QueryContext queryContext) {
private static ResultTable buildEmptySelectionResultTable(QueryContext
queryContext) {
List<ExpressionContext> selectExpressions =
queryContext.getSelectExpressions();
+ List<String> aliases = queryContext.getAliasList();
int numSelectExpressions = selectExpressions.size();
String[] columnNames = new String[numSelectExpressions];
for (int i = 0; i < numSelectExpressions; i++) {
- columnNames[i] = selectExpressions.get(i).toString();
+ if (selectExpressions.size() == aliases.size() && aliases.get(i) !=
null) {
Review Comment:
Have you encountered any situations where the alias list size doesn't match
the size of the select list? Based on
[this](https://github.com/apache/pinot/blob/d6778b5432ed70b8cac7daaa8a349e5382e003d5/pinot-core/src/main/java/org/apache/pinot/core/query/request/context/utils/QueryContextConverterUtils.java#L78-L94),
I believe they should always be the same size and the absence of an alias is
represented as `null` in the alias list (which you're already handling here).
--
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]