Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(connect): better error propagation & handling #3675

Merged
merged 27 commits into from
Jan 15, 2025

Conversation

universalmind303
Copy link
Contributor

@universalmind303 universalmind303 commented Jan 13, 2025

@github-actions github-actions bot added the chore label Jan 13, 2025
Copy link

codspeed-hq bot commented Jan 13, 2025

CodSpeed Performance Report

Merging #3675 will improve performances by 31.1%

Comparing universalmind303:error-messages (4183edc) with main (432714d)

Summary

⚡ 1 improvements
✅ 26 untouched benchmarks

Benchmarks breakdown

Benchmark main universalmind303:error-messages Change
test_iter_rows_first_row[100 Small Files] 302.6 ms 230.8 ms +31.1%

Copy link

codecov bot commented Jan 13, 2025

Codecov Report

Attention: Patch coverage is 67.56757% with 96 lines in your changes missing coverage. Please review.

Project coverage is 76.81%. Comparing base (6157ad8) to head (2b1bef3).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/daft-connect/src/connect_service.rs 56.32% 76 Missing ⚠️
src/daft-connect/src/execute.rs 81.57% 7 Missing ⚠️
.../daft-connect/src/translation/logical_plan/read.rs 78.12% 7 Missing ⚠️
src/daft-connect/src/util.rs 50.00% 4 Missing ⚠️
src/daft-connect/src/translation/logical_plan.rs 84.61% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3675      +/-   ##
==========================================
+ Coverage   76.75%   76.81%   +0.06%     
==========================================
  Files         728      729       +1     
  Lines       90944    91164     +220     
==========================================
+ Hits        69803    70027     +224     
+ Misses      21141    21137       -4     
Files with missing lines Coverage Δ
src/daft-connect/src/config.rs 54.54% <ø> (ø)
src/daft-connect/src/lib.rs 92.53% <ø> (+27.49%) ⬆️
src/daft-connect/src/response_builder.rs 100.00% <100.00%> (+13.15%) ⬆️
...-connect/src/translation/logical_plan/aggregate.rs 83.72% <100.00%> (+0.74%) ⬆️
src/daft-connect/src/translation/logical_plan.rs 32.20% <84.61%> (-5.60%) ⬇️
src/daft-connect/src/util.rs 77.27% <50.00%> (-15.59%) ⬇️
src/daft-connect/src/execute.rs 84.78% <81.57%> (+2.48%) ⬆️
.../daft-connect/src/translation/logical_plan/read.rs 75.55% <78.12%> (+1.87%) ⬆️
src/daft-connect/src/connect_service.rs 56.32% <56.32%> (ø)

... and 24 files with indirect coverage changes

Copy link
Contributor

@raunakab raunakab left a comment

Choose a reason for hiding this comment

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

Have a couple of comments, but looks good so far. Not super familiar with the inner workings of the service, so I'll take a deeper look into it when I get the chance.

}
plan => bail!("Unsupported relation type: \"{}\"", rel_name(&plan)),
plan => not_yet_implemented!("relation type: \"{}\"", rel_name(&plan))?,
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor nit:
Change to not_yet_implemented!(r#"relation type: "{}""#, rel_name(&plan))?, which will allow you to avoid escaping nested quotes.

let name = table.table_name;
bail!("Tried to write to table {name} but it is not yet implemented. Try to write to a path instead.");
SaveType::Table(_) => {
return not_yet_implemented!("write to table").map_err(|e| e.into())
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we have not_yet_implemented act similar to bail? I.e., the macro expands to a return Err(..)?;?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so I think I'll follow up with this in a separate PR. I'm planning on removing the eyre crate, and make the error handling similar to the rest of the codebase.

src/daft-connect/src/response_builder.rs Show resolved Hide resolved
@universalmind303 universalmind303 merged commit 809e411 into Eventual-Inc:main Jan 15, 2025
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants