FrankChen021 opened a new issue, #20632: URL: https://github.com/apache/druid/issues/20632
### Description User errors thrown on data servers are reported to the client as operator errors. Example: `SET useProjection = 'p'` on a groupBy query that projection `p` cannot satisfy. `Projections` throws `InvalidInput` (expected `INVALID_INPUT (USER)`, 400), but the client gets: ``` RUNTIME_FAILURE (OPERATOR) java.util.concurrent.ExecutionException: org.apache.druid.error.DruidException: Projection[p] specified, but does not satisfy query ``` Seen on Druid 37; master has the same code. ### Cause 1. `GroupByMergingQueryRunner` wraps the `ExecutionException` in a `RuntimeException` instead of unwrapping it, unlike `ChainedExecutionQueryRunner`. This affects groupBy only. 2. The broker's `JsonParserIterator` parses the data server's `DruidException` response as a legacy `QueryException`, which drops its category. Every native query then reports `UNCATEGORIZED (OPERATOR)` with HTTP 500. Both need fixing. The message could also be clearer. When no projection with that name exists in the segment, say `Projection[p] does not exist`. Keep `does not satisfy query` for the case where it exists but doesn't match. -- 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]
