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

fix(binder): bind correlated column without intermediate RwError #6194

Merged
merged 3 commits into from
Nov 3, 2022

Conversation

xiangjinwu
Copy link
Contributor

@xiangjinwu xiangjinwu commented Nov 3, 2022

I hereby agree to the terms of the Singularity Data, Inc. Contributor License Agreement.

What's changed and what's your intention?

Construction of RwError includes capturing the backtrace, which becomes very slow (~300ms) in single binary debug mode after recent toolchain bump. When we bind correlated columns, intermediate errors when stepping outer queries layer by layer does not need the backtrace. This PR changes these intermediate errors from RwError to ErrorCode.

Before toolchain bump:

| e2e_test/batch/./basic/subquery.slt.part                     .. [OK] in 684 ms

Current main:

| e2e_test/batch/./basic/subquery.slt.part                     .. [OK] in 13621 ms

This PR:

| e2e_test/batch/./basic/subquery.slt.part                     .. [OK] in 829 ms

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • All checks passed in ./risedev check (or alias, ./risedev c)

Refer to a related PR or issue link (optional)

#6157

@github-actions github-actions bot added the type/fix Bug fix label Nov 3, 2022
@codecov
Copy link

codecov bot commented Nov 3, 2022

Codecov Report

Merging #6194 (7e20b8b) into main (912db57) will decrease coverage by 0.15%.
The diff coverage is 48.41%.

@@            Coverage Diff             @@
##             main    #6194      +/-   ##
==========================================
- Coverage   74.36%   74.20%   -0.16%     
==========================================
  Files         935      939       +4     
  Lines      150096   150818     +722     
==========================================
+ Hits       111612   111918     +306     
- Misses      38484    38900     +416     
Flag Coverage Δ
rust 74.20% <48.41%> (-0.16%) ⬇️

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

Impacted Files Coverage Δ
src/frontend/src/optimizer/plan_node/plan_base.rs 96.96% <0.00%> (-3.04%) ⬇️
.../frontend/src/optimizer/plan_node/stream_derive.rs 0.00% <0.00%> (ø)
src/meta/src/lib.rs 0.96% <ø> (+0.03%) ⬆️
src/storage/src/hummock/file_cache/cache.rs 90.76% <0.00%> (-0.85%) ⬇️
src/storage/src/hummock/mod.rs 54.97% <0.00%> (-2.22%) ⬇️
src/stream/src/executor/mod.rs 48.32% <ø> (ø)
src/stream/src/from_proto/mod.rs 0.00% <ø> (ø)
src/stream/src/from_proto/sort.rs 0.00% <0.00%> (ø)
src/frontend/src/optimizer/plan_node/stream.rs 13.55% <13.95%> (-0.57%) ⬇️
src/storage/src/hummock/file_cache/store.rs 89.96% <14.28%> (-1.78%) ⬇️
... and 24 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@xiangjinwu xiangjinwu marked this pull request as ready for review November 3, 2022 08:28
@xiangjinwu xiangjinwu requested a review from BugenZhao November 3, 2022 08:28
@BugenZhao
Copy link
Member

LGTM as a workaround. 🤔

@xiangjinwu
Copy link
Contributor Author

LGTM as a workaround. 🤔

... and the real solution being #2366 🤦

@mergify mergify bot merged commit a6c88e9 into main Nov 3, 2022
@mergify mergify bot deleted the XJ-fix-subquery-fe-perf branch November 3, 2022 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/fix Bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants