Skip to content

feat: MSQ exception handling improvements.#19234

Open
gianm wants to merge 5 commits intoapache:masterfrom
gianm:msq-druidexceptions
Open

feat: MSQ exception handling improvements.#19234
gianm wants to merge 5 commits intoapache:masterfrom
gianm:msq-druidexceptions

Conversation

@gianm
Copy link
Copy Markdown
Contributor

@gianm gianm commented Mar 30, 2026

This patch makes various changes to MSQ exception handling, with the goal of better compatibility with DruidExceptions:

  1. Add DruidExceptionFault, which allows including DruidException in MSQErrorReport without losing any information.

  2. Make MSQFault#toDruidException abstract so all fault implementations must reference a specific category and persona. Changed the category and persona of various faults, in situations where the inherited default was not ideal.

  3. QueryRuntimeFault no longer generated, instead we're relying fully on DruidException for exceptions that originate in the query runtime.

  4. Retain original DruidException, rather than wrapping and re-throwing, in ControllerImpl, SegmentGeneratorFrameProcessor, and RowBasedFrameWriter.

  5. Update Either to throw non-DEVELOPER DruidException as-is, rather than wrapping them.

This patch makes various changes to MSQ exception handling, with the
goal of better compatibility with DruidExceptions:

1) Add DruidExceptionFault, which allows including DruidExceptions in
   MSQErrorReports without losing any information.

2) Make MSQFault#toDruidException abstract so all fault implementations
   must reference a specific category and persona. Changed the category
   and persona of various faults, in situations where the inherited
   default was not ideal.

3) QueryRuntimeFault no longer generated, instead we're relying fully
   on DruidException for exceptions that originate in the query runtime.

4) Retain original DruidException, rather than wrapping and re-throwing,
   in ControllerImpl, SegmentGeneratorFrameProcessor, and
   RowBasedFrameWriter.

5) Update Either to throw non-DEVELOPER DruidExceptions as-is, rather
   than wrapping them.
@github-actions github-actions bot added Area - Documentation Area - Batch Ingestion Area - Querying Area - MSQ For multi stage queries - https://github.com/apache/druid/issues/12262 labels Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area - Batch Ingestion Area - Documentation Area - MSQ For multi stage queries - https://github.com/apache/druid/issues/12262 Area - Querying

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant