albertobastos opened a new pull request, #15753:
URL: https://github.com/apache/pinot/pull/15753

   When MSE detects an `arrayToMv` operation in an intermediate stage it throws 
an error because that function is only supported by leaf stages.
   
   However, the exception thrown (`UnsupportedOperationException`) did not let 
the broker to handle the exception properly and return it with enough context 
in the response.
   
   This PR changes the Exception thrown to `QueryException` with a 
`QUERY_PLANNING_ERROR` code, more suited for that case and making the broker 
capable of extracting the actual error message.
   
   It can be tested launching the `MultiEngineQuickStart` and executing the 
following query:
   
   ~~~sql
   SELECT 
   AirTime
   FROM airlineStats
   WHERE (
    array_to_mv(DivTailNums) IN (
      'c5f720f9bb86a59c65ac75581650dbe0',
      'f276ee65c0bbd2461d9d3f1ff349f6f7'
    )
    OR (
      array_to_mv(DivTailNums) = 'c749bab35e6243d6e15f9f133988abeb'
      AND AirTime IN (
        SELECT AirTime
        FROM airlineStats
        WHERE ArrDelay = 2
      )
    )
   );
   ~~~
   
   Before:
   ~~~
   InternalError: Error while planning query
   ~~~
   
   After:
   ~~~
   QueryPlanningError: Function 'ArrayToMv' is not supported in FILTER 
Intermediate Stage
   ~~~


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

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