You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "sunny19930321 (via GitHub)" <gi...@apache.org> on 2026/04/08 06:25:40 UTC
[PR] feat: add truncate table partition check ifexists [doris]
sunny19930321 opened a new pull request, #62211:
URL: https://github.com/apache/doris/pull/62211
### What problem does this PR solve?
Issue Number: close (https://github.com/apache/doris/issues/62210)
Related PR: (https://github.com/apache/doris/pull/377)
Problem Summary:
### Release note
TRUNCATE TABLE [db.]tbl [IF EXISTS][PARTITION(p1, p2, ...)] [FORCE];
example:
truncate table range_table_nullable if exists PARTITION(p20260406000000,p20260403000000);
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [ ] Regression test
- [ ] Unit Test
- [ ] Manual test (add detailed scripts or steps below)
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason <!-- Add your reason? -->
- Behavior changed:
- [ ] No.
- [ ] Yes. <!-- Explain the behavior change -->
- Does this need documentation?
- [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg: https://github.com/apache/doris-website/pull/1214 -->
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR should merge into -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] branch-2.1: [feat] (fe)add truncate table partition check ifexists [doris]
Posted by "sunny19930321 (via GitHub)" <gi...@apache.org>.
sunny19930321 closed pull request #62211: branch-2.1: [feat] (fe)add truncate table partition check ifexists
URL: https://github.com/apache/doris/pull/62211
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] feat: add truncate table partition check ifexists [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #62211:
URL: https://github.com/apache/doris/pull/62211#issuecomment-4204256000
Thank you for your contribution to Apache Doris.
Don't know what should be done next? See [How to process your PR](https://cwiki.apache.org/confluence/display/DORIS/How+to+process+your+PR).
Please clearly describe your PR:
1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
3. What features were added. Why was this function added?
4. Which code was refactored and why was this part of the code refactored?
5. Which functions were optimized and what is the difference before and after the optimization?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] branch-2.1: [feat] (fe)add truncate table partition check ifexists [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #62211: branch-2.1: [feat] (fe)add truncate table partition check ifexists
URL: https://github.com/apache/doris/pull/62211
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] branch-2.1: [feat] (fe)add truncate table partition check ifexists [doris]
Posted by "sunny19930321 (via GitHub)" <gi...@apache.org>.
sunny19930321 commented on PR #62211:
URL: https://github.com/apache/doris/pull/62211#issuecomment-4204345976
1.What problem was fixed (it's best to include specific error reporting information). How it was fixed.
The truncate partition does not check the existence of the partition, resulting in the deletion of the partition can not find the partition. The IF EXISTS is added to determine whether the partition exists
2.Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
IF EXISTS PARTITION was not supported before, but now the syntax supports IF EXISTS PARTITION
3.What features were added. Why was this function added?
Create an automatic partition, since the write does not have this partition, before the write will have a prefix function to clean the partition data, and then write,this time will throw an error, the write task fails
4.Which code was refactored and why was this part of the code refactored?
The sql parsing functions DorisParser.g4 and sql_parser.cup are involved, and the classes TruncateTableStmt.java and InternalCatalog.java handle the IF EXISTS logic
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] branch-2.1: [feat] (fe)add truncate table partition check ifexists [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #62211:
URL: https://github.com/apache/doris/pull/62211#issuecomment-6049539145
We're closing this PR because it hasn't been updated in a while.
This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
If you'd like to revive this PR, please reopen it and feel free a maintainer to remove the Stale tag!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] branch-2.1: [feat] (fe)add truncate table partition check ifexists [doris]
Posted by "sunny19930321 (via GitHub)" <gi...@apache.org>.
sunny19930321 commented on PR #62211:
URL: https://github.com/apache/doris/pull/62211#issuecomment-4221557089
pr to master,this pr close
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] branch-2.1: [feat] (fe)add truncate table partition check ifexists [doris]
Posted by "sunny19930321 (via GitHub)" <gi...@apache.org>.
sunny19930321 commented on PR #62211:
URL: https://github.com/apache/doris/pull/62211#issuecomment-4212515208
run buildall
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org