Skip to content

Conversation

@MazterQyou
Copy link
Member

Check List

  • Tests have been run in packages where changes have been made if available
  • Linter has been run for changed code
  • Tests for the changes have been added if not covered yet
  • Docs have been added / updated if required

Description of Changes Made

This PR improves error handling, unwrapping an onion of nested DataFusion and Arrow errors, and adding information regarding whether the error happened in the database execution or post-processing steps.

@MazterQyou MazterQyou requested review from a team as code owners November 5, 2025 21:50
@github-actions github-actions bot added the rust Pull requests that update Rust code label Nov 5, 2025
@codecov
Copy link

codecov bot commented Nov 5, 2025

Codecov Report

❌ Patch coverage is 22.07792% with 60 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.06%. Comparing base (77bbe2e) to head (5c9d92d).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
rust/cubesql/cubesql/src/sql/postgres/shim.rs 20.40% 39 Missing ⚠️
rust/cubesql/cubesql/src/compile/engine/df/scan.rs 25.00% 21 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #10118       +/-   ##
===========================================
+ Coverage   55.17%   78.06%   +22.89%     
===========================================
  Files         213      457      +244     
  Lines       16904    91078    +74174     
  Branches     3335     3335               
===========================================
+ Hits         9326    71101    +61775     
- Misses       7100    19499    +12399     
  Partials      478      478               
Flag Coverage Δ
cube-backend 55.17% <ø> (ø)
cubesql 83.28% <22.07%> (?)

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

#[error("CubeError: {0}")]
Cube(CubeError, Option<Arc<SpanId>>),
#[error("DataFusionError: {0}")]
DataFusion(DataFusionError, Option<Arc<SpanId>>),
Copy link
Member

@ovr ovr Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably, we need to box DataFusionError, ArrowError. I assume it's a large enum. Can we add 1-liner tests with assert_eq for mem::size_of<ConnectionError>. Thanks

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested this and CubeError is the variant of biggest size. DataFusionError and ArrowError actually happen to be the smallest, so I avoided boxing them in the end. I added the mem::size_of test to verify this.

Copy link
Member

@ovr ovr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, minor nit, related to Boxing + check sizeof

@MazterQyou MazterQyou force-pushed the cubesql/error-handling-improvement branch from 9b86e64 to b5d23ad Compare November 7, 2025 19:21
@MazterQyou MazterQyou force-pushed the cubesql/error-handling-improvement branch from b5d23ad to 5c9d92d Compare November 7, 2025 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants