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

implement physical_limit.cpp for support limit #391

Merged
merged 7 commits into from
Dec 28, 2023

Conversation

KKould
Copy link
Member

@KKould KKould commented Dec 27, 2023

What problem does this PR solve?

  • implement physical_limit.cpp & physical_merge_limit.cpp
  • fixed build logical_plan for limit
  • add python test script for limit
  • support stream sink for physical_sink.cpp

Issue link: #362

What is changed and how it works?

kould=> SELECT * FROM test_limit limit 10;
 c1 | c2 
----+----
  0 |  1
  2 |  3
  4 |  5
  6 |  7
(4 rows)

kould=> SELECT * FROM test_limit limit 2 offset 2;
 c1 | c2 
----+----
  4 |  5
  6 |  7
(2 rows)

Code changes

  • Has Code change
  • Has CI related scripts change

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Note for reviewer

…est_big_limit limit 8500 offset 20;` when 9000 pieces of data are executed
@JinHai-CN JinHai-CN merged commit 1dea05d into infiniflow:main Dec 28, 2023
2 checks passed
KKould added a commit to KKould/infinity-k that referenced this pull request Jan 4, 2024
* feat: impl limit

* test: add limit.slt for limit case

* fix conflict

* perf: Implement MergeLimit to end the upstream operator early

* code fmt

* fix: the limit quantity is incorrect. When executing `SELECT * FROM test_big_limit limit 8500 offset 20;` when 9000 pieces of data are executed

* code fmt
mergify bot pushed a commit that referenced this pull request Jan 4, 2024
* implement physical_limit.cpp for support limit (#391)

* feat: impl limit

* test: add limit.slt for limit case

* fix conflict

* perf: Implement MergeLimit to end the upstream operator early

* code fmt

* fix: the limit quantity is incorrect. When executing `SELECT * FROM test_big_limit limit 8500 offset 20;` when 9000 pieces of data are executed

* code fmt

* fix: remapper error when Project has no first column or column order is reverse order (#398)

* fix: column binding miss on order by functions

* fix & perf:

- fix physical_limit offset
- fix lazy load output_names wrong on join
- remove `RetainColumnByIds`

* fix: order by function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants