Skip to content

Conversation

@shauryachats
Copy link
Collaborator

Summary

This PR enhances the time series query execution framework to properly propagate and expose query exceptions instead of throwing them, enabling better error handling and reporting for both broker-compatible and Prometheus-compatible APIs.
This enables partial results with warnings instead of complete failures, as well as exceptions from leaf operators visible at the broker level.

The exceptions are encoded in the metadataMap passed alongside data, and stored in TimeSeriesBlock for upward propagation.

To support partial results for Prometheus-compatible API, this PR also introduces a warnings field (as specified in the Prometheus API reference) to expose these warnings correctly.

Testing

Added integration test testQueryWithServerException to verify exception handling for both response formats:

  • Broker-compatible API: validates exceptions are properly returned with error codes.
  • Prometheus-compatible API: validates warnings are included in success responses.

@codecov-commenter
Copy link

codecov-commenter commented Dec 30, 2025

Codecov Report

❌ Patch coverage is 18.86792% with 43 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.25%. Comparing base (6c87d2e) to head (3162d3f).

Files with missing lines Patch % Lines
...runtime/timeseries/serde/TimeSeriesBlockSerde.java 18.18% 17 Missing and 1 partial ⚠️
...ery/runtime/timeseries/LeafTimeSeriesOperator.java 0.00% 15 Missing ⚠️
...common/response/PinotBrokerTimeSeriesResponse.java 0.00% 9 Missing ⚠️
...va/org/apache/pinot/query/runtime/QueryRunner.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #17440      +/-   ##
============================================
- Coverage     63.28%   63.25%   -0.04%     
  Complexity     1474     1474              
============================================
  Files          3161     3161              
  Lines        188588   188629      +41     
  Branches      28857    28864       +7     
============================================
- Hits         119351   119309      -42     
- Misses        59983    60067      +84     
+ Partials       9254     9253       -1     
Flag Coverage Δ
custom-integration1 100.00% <ø> (ø)
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-11 63.22% <18.86%> (+7.66%) ⬆️
java-21 63.23% <18.86%> (-0.05%) ⬇️
temurin 63.25% <18.86%> (-0.04%) ⬇️
unittests 63.24% <18.86%> (-0.04%) ⬇️
unittests1 55.56% <18.86%> (-0.05%) ⬇️
unittests2 34.00% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@shauryachats shauryachats added timeseries-engine Tracking tag for generic time-series engine work timeseries-general-availability Work for making Timeseries Engine GA in Pinot (e.g. Controller UI support, debuggability, etc.) labels Dec 30, 2025
@shauryachats shauryachats force-pushed the timeseries_errorblock branch from ef45467 to 3162d3f Compare January 3, 2026 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

timeseries-engine Tracking tag for generic time-series engine work timeseries-general-availability Work for making Timeseries Engine GA in Pinot (e.g. Controller UI support, debuggability, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants