-
Notifications
You must be signed in to change notification settings - Fork 362
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
Count distinct is not supported #741
Labels
Comments
SQLite query plan sqlite> EXPLAIN select count(distinct t1) from temp2;
addr opcode p1 p2 p3 p4 p5 comment
---- ------------- ---- ---- ---- ------------- -- -------------
0 Init 0 15 0 0
1 Null 0 1 2 0
2 OpenEphemeral 1 0 0 k(1,B) 0
3 OpenRead 0 2 0 1 0
4 Rewind 0 11 0 0
5 Column 0 0 3 0
6 Found 1 10 3 1 0
7 MakeRecord 3 1 4 0
8 IdxInsert 1 4 3 1 16
9 AggStep 0 3 1 count(1) 1
10 Next 0 5 0 1
11 AggFinal 1 1 0 count(1) 0
12 Copy 1 5 0 0
13 ResultRow 5 1 0 0
14 Halt 0 0 0 0
15 Transaction 0 0 1 0 1
16 Goto 0 1 0 0 vs limbo query plan limbo> EXPLAIN select count(distinct t1) from temp2;
addr opcode p1 p2 p3 p4 p5 comment
---- ----------------- ---- ---- ---- ------------- -- -------
0 Init 0 13 0 0 Start at 13
1 OpenReadAsync 0 2 0 0 table=temp2, root=2
2 OpenReadAwait 0 0 0 0
3 RewindAsync 0 0 0 0
4 RewindAwait 0 9 0 0 Rewind table temp2
5 Column 0 0 3 0 r[3]=temp2.t1
6 AggStep 0 3 2 count 0 accum=r[2] step(r[3])
7 NextAsync 0 0 0 0
8 NextAwait 0 5 0 0
9 AggFinal 0 2 0 count 0 accum=r[2]
10 Copy 2 1 0 0 r[1]=r[2]
11 ResultRow 1 1 0 0 output=r[1]
12 Halt 0 0 0 0
13 Transaction 0 0 0 0
14 Goto 0 1 0 0 |
lgualtieri75
added a commit
to lgualtieri75/limbo
that referenced
this issue
Mar 1, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
LImbo returns the wrong results for count distinct as shown below
sqlite3
limbo
The text was updated successfully, but these errors were encountered: