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

feat: limit total rows copied in COPY TABLE FROM with LIMIT segment #3910

Merged
merged 18 commits into from
May 16, 2024

Conversation

irenjj
Copy link
Collaborator

@irenjj irenjj commented May 10, 2024

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

close: #3889

What's changed and what's your intention?

limit total rows copied in COPY TABLE FROM with LIMIT segment

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR does not require documentation updates.

@irenjj irenjj requested a review from a team as a code owner May 10, 2024 12:50
@github-actions github-actions bot added the docs-not-required This change does not impact docs. label May 10, 2024
@github-actions github-actions bot removed the docs-not-required This change does not impact docs. label May 10, 2024
@github-actions github-actions bot added the docs-required This change requires docs update. label May 10, 2024
Copy link

codecov bot commented May 10, 2024

Codecov Report

Attention: Patch coverage is 52.94118% with 16 lines in your changes are missing coverage. Please review.

Project coverage is 85.08%. Comparing base (b8a325d) to head (f78088c).
Report is 53 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3910      +/-   ##
==========================================
- Coverage   86.03%   85.08%   -0.96%     
==========================================
  Files         955      978      +23     
  Lines      163851   168298    +4447     
==========================================
+ Hits       140969   143189    +2220     
- Misses      22882    25109    +2227     

@waynexia waynexia self-requested a review May 10, 2024 13:24
Copy link
Contributor

@evenyag evenyag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM

src/operator/src/statement/copy_table_from.rs Outdated Show resolved Hide resolved
src/operator/src/statement/copy_table_from.rs Outdated Show resolved Hide resolved
@irenjj irenjj requested review from waynexia and evenyag May 14, 2024 12:38
Copy link
Contributor

@evenyag evenyag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could only support the limit syntax.

src/operator/src/statement/copy_table_from.rs Outdated Show resolved Hide resolved
src/operator/src/statement/copy_table_from.rs Outdated Show resolved Hide resolved
src/sql/src/error.rs Outdated Show resolved Hide resolved
@killme2008 killme2008 enabled auto-merge May 16, 2024 01:40
Copy link
Contributor

@killme2008 killme2008 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. A few suggestions about the error info, please take a look.

src/sql/src/parsers/copy_parser.rs Outdated Show resolved Hide resolved
src/sql/src/parsers/copy_parser.rs Outdated Show resolved Hide resolved
auto-merge was automatically disabled May 16, 2024 05:54

Head branch was pushed to by a user without write access

@evenyag evenyag added this pull request to the merge queue May 16, 2024
Merged via the queue into GreptimeTeam:main with commit f93b5b1 May 16, 2024
20 checks passed
@irenjj irenjj deleted the limit_segment branch May 16, 2024 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-required This change requires docs update.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Condionally limit total rows in COPY FROM
5 participants