Skip to content

feat: Support the DELETE SQL statement#942

Merged
evenyag merged 38 commits intoGreptimeTeam:developfrom
jun0315:xqj_delete
Feb 15, 2023
Merged

feat: Support the DELETE SQL statement#942
evenyag merged 38 commits intoGreptimeTeam:developfrom
jun0315:xqj_delete

Conversation

@jun0315
Copy link
Copy Markdown
Contributor

@jun0315 jun0315 commented Feb 4, 2023

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

Support the DELETE SQL statement but require specifying the full primary key (and the timestamp)

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link

issue : #755

@jun0315 jun0315 changed the title [WIP]:delete sql feat: Support the DELETE SQL statement Feb 5, 2023
@jun0315 jun0315 marked this pull request as ready for review February 9, 2023 03:16
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 9, 2023

Codecov Report

Merging #942 (6e8f17a) into develop (8491f65) will increase coverage by 0.07%.
The diff coverage is 71.97%.

@@             Coverage Diff             @@
##           develop     #942      +/-   ##
===========================================
+ Coverage    86.05%   86.12%   +0.07%     
===========================================
  Files          431      435       +4     
  Lines        61600    62642    +1042     
===========================================
+ Hits         53008    53949     +941     
- Misses        8592     8693     +101     
Flag Coverage Δ
rust 86.12% <71.97%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/frontend/src/instance.rs 79.51% <0.00%> (-0.21%) ⬇️
src/query/src/datafusion/planner.rs 68.85% <ø> (ø)
src/sql/src/statements.rs 90.54% <ø> (ø)
src/sql/src/statements/statement.rs 50.00% <ø> (ø)
src/sql/src/statements/delete.rs 61.76% <61.76%> (ø)
src/datanode/src/sql/delete.rs 72.15% <72.15%> (ø)
src/datanode/src/sql.rs 78.44% <80.00%> (+0.09%) ⬆️
src/sql/src/parsers/delete_parser.rs 81.48% <81.48%> (ø)
src/datanode/src/instance/sql.rs 79.69% <100.00%> (+0.23%) ⬆️
src/datanode/src/sql/insert.rs 80.85% <100.00%> (-1.51%) ⬇️
... and 34 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Comment thread src/storage/src/write_batch.rs Outdated
Comment thread src/datanode/src/tests/instance_test.rs
Comment thread src/datanode/src/sql/delete.rs Outdated
Comment thread src/datanode/src/sql/delete.rs Outdated
@jun0315
Copy link
Copy Markdown
Contributor Author

jun0315 commented Feb 9, 2023

PTAL:D @waynexia

Copy link
Copy Markdown
Member

@waynexia waynexia left a comment

Choose a reason for hiding this comment

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

Mostly looks good to me 👍 , only left some tiny comments about style.

Comment thread tests/cases/standalone/insert/insert_invalid.sql
Comment thread tests/cases/standalone/delete/delete_invalid.result Outdated
Comment thread src/sql/src/statements/delete.rs Outdated
Comment thread src/datanode/src/error.rs Outdated
Comment thread tests/cases/standalone/delete/delete.sql Outdated
Comment thread src/table/src/requests.rs Outdated
Comment thread src/sql/src/statements/delete.rs
Comment thread src/datanode/src/sql.rs Outdated
Comment thread src/datanode/src/sql/delete.rs Outdated
Comment thread src/datanode/src/sql/delete.rs Outdated
Comment thread src/datanode/src/sql/delete.rs Outdated
Comment thread src/datanode/src/sql/delete.rs Outdated
Comment thread src/datanode/src/sql/delete.rs Outdated
@jun0315
Copy link
Copy Markdown
Contributor Author

jun0315 commented Feb 13, 2023

PTAL:D @evenyag

Comment thread src/sql/src/statements/delete.rs Outdated
Comment thread src/datanode/src/sql/delete.rs Outdated
Comment thread src/datanode/src/sql/delete.rs Outdated
Comment thread src/datanode/src/instance/sql.rs Outdated
Comment thread src/datatypes/src/schema.rs Outdated
@evenyag evenyag merged commit de0b8aa into GreptimeTeam:develop Feb 15, 2023
@jun0315 jun0315 deleted the xqj_delete branch February 15, 2023 06:29
@jun0315 jun0315 restored the xqj_delete branch February 28, 2023 08:32
@jun0315 jun0315 deleted the xqj_delete branch February 28, 2023 08:32
paomian pushed a commit to paomian/greptimedb that referenced this pull request Oct 19, 2023
* [WIP]:delete sql

* [fix]:time parser bug

* [fix]:resolve conflict

* [fmt]:cargo fmt

* [fix]:remove unless log

* [fix]:test

* [feat]:add error parse

* [fix]:resolve conflict

* [fix]:remove unless code

* [fix]:remove unless code

* [test]:add IT

* [fix]:add license

* [fix]:ci

* [fix]:ci

* [fix]:ci

* [fix]:remove

* [fix]:ci

* [feat]:add sql

* [fix]:modify sql

* [feat]:refactor parser_expr

* [feat]:rm backtrace

* [fix]:ci

* [fix]: conversation

* [fix]: conversation

* feat:refactor delete

* feat:refactor delete

* fix:resolve conversation

* fix:ut

* fix:ut

* fix:conversation

* fix:conversation

* fix:conservation

---------

Co-authored-by: xieqijun <qijun@apache.org>
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.

3 participants