We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
LImbo returns the wrong results for count distinct as shown below
sqlite3
sqlite> create table temp2 (t1 text); sqlite> insert into temp2 values ('1'),('1'),('2'); sqlite> select count(*) from temp2; 3 sqlite> select count(distinct t1) from temp2; 2
limbo
limbo> create table temp2 (t1 text); limbo> insert into temp2 values ('1'),('1'),('2'); limbo> select count(*) from temp2; 3 limbo> select count(distinct t1) from temp2; 3
The text was updated successfully, but these errors were encountered:
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
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
LImbo returns the wrong results for count distinct as shown below
sqlite3
limbo
The text was updated successfully, but these errors were encountered: