-
Notifications
You must be signed in to change notification settings - Fork 525
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
test: set sortmode rowsort #3582
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3582 +/- ##
==========================================
+ Coverage 74.36% 74.40% +0.04%
==========================================
Files 771 771
Lines 108713 108925 +212
==========================================
+ Hits 80845 81051 +206
- Misses 27868 27874 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
I believe this should not be set globally and should be carefully reviewed to add on specific queries. Some queries have order-by, which means that they should have order when being scanned out. |
|
I think most queries without order by should be rowsort? |
|
Anyway, I agree that most queries don't require order. We can simply add a nosort to order by. |
BTW, this also reminds me of another problem that parallel scan on ordered mv may have unorderd results? 🤡 |
Yes, batch query should do a merge sort after parallel scan. |
One more thing. Do you feel set VARIABLE in sqllogictest is a file-level or statement or a statement affecting global state? Now it's implemented as latter, so if someone do: include a.slt If a.slt sets a row sort mode, b.slt will also be affected. If you feel this is counter-intuitive, maybe we can change the behavior of sqllogictest. |
Sounds like a problem, but it didn't occur in our case, because we include Not sure which is better. |
BTW I'm also considering adding CLI arg to control default sortmode? Also considering strict mode where every query should have an explicit sortmode 😇 |
@st1page has some investigations about it. |
+1. I believe this is important or user may find that TopN in materialized views make no sense. 🤣 Suggest reverting this PR after merge sort on top of the scans is implemented, then we can discuss which query does not need to be ordered. |
Let's go to #3583 for more discussion if any |
…ingwavelabs#3600) Revert "test: set sortmode rowsort (risingwavelabs#3582)" This reverts commit d2ec610. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
I hereby agree to the terms of the Singularity Data, Inc. Contributor License Agreement.
What's changed and what's your intention?
Problem occured in #3251. After we have parralel batch scan, the results from each partition is not ordered.
I think sorting results by default makes sense.
nosort
should be added explicitly for special cases.This PR added
control sortmode rowsort
to allslt
files. Tell me if some files should usenosort