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(batch scheduler): has_table_scan had false negative #3175

Merged
merged 4 commits into from
Jun 14, 2022

Conversation

xiangjinwu
Copy link
Contributor

@xiangjinwu xiangjinwu commented Jun 13, 2022

What's changed and what's your intention?

Found this issue in #3172, where stage 4 and 7 were marked as has_table_scan = false with Fragment:

BatchProject { exprs: [$0, ($1 * (1:Int32 - $2))] }
  BatchFilter { predicate: ($3 >= '1993-01-01':Varchar::Date) AND ($3 < ('1993-01-01':Varchar::Date + '3 mons 00:00:00':Interval)) }
    BatchScan { table: lineitem, columns: [l_suppkey, l_extendedprice, l_discount, l_shipdate] }

Hard to test its e2e impact.

Checklist

  • I have written necessary docs and 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)

@github-actions github-actions bot added the type/fix Bug fix label Jun 13, 2022
@xiangjinwu xiangjinwu marked this pull request as ready for review June 13, 2022 09:38
@xiangjinwu xiangjinwu requested a review from lmatz June 13, 2022 09:38
Copy link
Contributor

@liurenjie1024 liurenjie1024 left a comment

Choose a reason for hiding this comment

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

Generally LGTM, please add some tests.

@liurenjie1024
Copy link
Contributor

Not sure what the actual impact is. No tests were added.

It may early release hummock snapshot.

@codecov
Copy link

codecov bot commented Jun 13, 2022

Codecov Report

Merging #3175 (b77fb67) into main (6d98333) will increase coverage by 0.00%.
The diff coverage is 90.00%.

@@           Coverage Diff           @@
##             main    #3175   +/-   ##
=======================================
  Coverage   73.57%   73.57%           
=======================================
  Files         744      744           
  Lines      102180   102191   +11     
=======================================
+ Hits        75174    75192   +18     
+ Misses      27006    26999    -7     
Flag Coverage Δ
rust 73.57% <90.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
src/frontend/src/scheduler/distributed/query.rs 67.20% <50.00%> (ø)
src/frontend/src/scheduler/plan_fragmenter.rs 93.64% <100.00%> (+0.42%) ⬆️
src/meta/src/hummock/mock_hummock_meta_client.rs 42.39% <0.00%> (-1.09%) ⬇️
src/storage/src/hummock/local_version_manager.rs 84.12% <0.00%> (-0.16%) ⬇️
src/common/src/types/mod.rs 68.07% <0.00%> (+0.16%) ⬆️
...c/frontend/src/optimizer/plan_node/batch_filter.rs 97.43% <0.00%> (+17.94%) ⬆️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@xiangjinwu
Copy link
Contributor Author

Not sure what the actual impact is. No tests were added.

It may early release hummock snapshot.

So it is hard to test e2e and we shall just leverage unit tests. Right?

@liurenjie1024
Copy link
Contributor

Yes, it hard to test in e2e.

@lmatz
Copy link
Contributor

lmatz commented Jun 13, 2022

because our plan is a DAG now?

I see.... It's stage level instead of node level flag.

@xiangjinwu
Copy link
Contributor Author

because our plan is a DAG now?

No. Because the boolean flag is set back to false when the recursion returns thru ancestors 😂

@xiangjinwu xiangjinwu force-pushed the fix-batch-scheduler-has-table-scan branch from c0c44f6 to b77fb67 Compare June 14, 2022 03:11
@xiangjinwu xiangjinwu enabled auto-merge (squash) June 14, 2022 03:12
@xiangjinwu xiangjinwu merged commit 48efe99 into main Jun 14, 2022
@xiangjinwu xiangjinwu deleted the fix-batch-scheduler-has-table-scan branch June 14, 2022 03:22
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.

None yet

3 participants