jadami10 commented on code in PR #17143:
URL: https://github.com/apache/pinot/pull/17143#discussion_r2495987306


##########
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:
   I haven't, but given the nature of the empty response bugs I've been 
tackling, effectively an edge case within an edge case, I better safe than 
discover another issue later.



-- 
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]

Reply via email to