ankitsultana opened a new issue, #9190:
URL: https://github.com/apache/pinot/issues/9190

   Using the Multi Stage quickstart, you can reproduce this issue with the 
following query.:
   
   ```
   SELECT
     a.playerID,
     count(*)
   FROM
     baseballStats_OFFLINE AS a
     JOIN baseballStats_OFFLINE AS b ON a.playerID = b.playerID
   WHERE
     a.runs > 160
     AND b.runs < 2
   GROUP BY
     a.playerID
   ```
   
   Exception:
   ```
   [
     {
       "errorCode": 200,
       "message": "QueryExecutionError:\njava.lang.RuntimeException: Received 
error query execution result block: {1000=class java.lang.String cannot be cast 
to class java.lang.Number (java.lang.String and java.lang.Number are in module 
java.base of loader 'bootstrap')}\n\tat 
org.apache.pinot.query.service.QueryDispatcher.reduceMailboxReceive(QueryDispatcher.java:134)\n\tat
 
org.apache.pinot.query.service.QueryDispatcher.submitAndReduce(QueryDispatcher.java:73)\n\tat
 
org.apache.pinot.broker.requesthandler.MultiStageBrokerRequestHandler.handleSQLRequest(MultiStageBrokerRequestHandler.java:147)\n\tat
 
org.apache.pinot.broker.requesthandler.MultiStageBrokerRequestHandler.handleRequest(MultiStageBrokerRequestHandler.java:122)"
     }
   ]
   ```
   
   I think the issue is coming from this method: 
https://github.com/apache/pinot/blob/master/pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/AggregateOperator.java#L88
   
   For count(*) there are no operands so this returns 0, but the value at the 0 
index is `playerID` and not the aggregation result.


-- 
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: commits-unsubscr...@pinot.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to