-
Notifications
You must be signed in to change notification settings - Fork 644
feat(optimizer): index accelerating TopN
#7726
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
Changes from 20 commits
398d938
4bf7616
ff9d519
4a9efc6
93ef95c
3d6798d
f9fcc0a
baf8e6c
495fa8e
978a480
616dc8a
fbd1b3d
3e7679e
ff4eaa8
5e51615
8265643
e277ee8
37ce43c
fc94781
cb87843
8f352b3
aeb41e4
e7cb28d
f537a4f
cd261db
260834c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
statement ok | ||
SET RW_IMPLICIT_FLUSH TO true; | ||
|
||
statement ok | ||
create table t(x int, y int); | ||
|
||
statement ok | ||
create index idx on t(x); | ||
|
||
statement ok | ||
insert into t values (100, 3), (1, 0), (2, 3), (3, 4), (5, 4); | ||
|
||
query II | ||
select * from t order by x limit 1; | ||
---- | ||
1 0 | ||
|
||
query II | ||
select * from t order by x limit 3; | ||
---- | ||
1 0 | ||
2 3 | ||
3 4 | ||
|
||
statement ok | ||
create table t1(x int primary key, y int); | ||
|
||
statement ok | ||
insert into t1 values (100, 3), (1, 0), (2, 3), (3, 4), (5, 4); | ||
|
||
query II | ||
select * from t1 order by x limit 1; | ||
---- | ||
1 0 | ||
|
||
query II | ||
select * from t1 order by x limit 3; | ||
---- | ||
1 0 | ||
2 3 | ||
3 4 | ||
|
||
statement ok | ||
drop table t; | ||
|
||
statement ok | ||
drop table t1; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,11 @@ message RowSeqScanNode { | |
common.Buffer vnode_bitmap = 4; | ||
// Whether the order on output columns should be preserved. | ||
bool ordered = 5; | ||
|
||
message ChunkSize { | ||
uint32 chunk_size = 1; | ||
} | ||
ChunkSize chunk_size = 6; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I remember long ago we forbid There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I propose we leave it for a future task that refractors all those optional workarounds 😂 |
||
} | ||
|
||
message SysRowSeqScanNode { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing whitespace here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch!