fix: [6789525493] Fix tsma drop with if exists.#34858
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
Pull request overview
This PR aims to make DROP TSMA IF EXISTS succeed when the target TSMA does not exist (instead of returning sma not exist), and adds a regression test for that behavior.
Changes:
- Suppress parser error logging for the expected “TSMA not exist” condition when fetching TSMA metadata.
- Update
translateDropTSMAto treatTSDB_CODE_MND_SMA_NOT_EXISTas success whenIF EXISTSis specified. - Add a regression test that drops a non-existent TSMA with
IF EXISTS.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
test/cases/19-TSMAs/test_tsma.py |
Adds regression coverage for dropping a missing TSMA with IF EXISTS. |
source/libs/parser/src/parUtil.c |
Avoids emitting parser error logs for TSDB_CODE_MND_SMA_NOT_EXIST from TSMA cache lookups. |
source/libs/parser/src/parTranslater.c |
Adjusts TSMA lookup/error handling during drop translation to support IF EXISTS. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
226e7ea to
fbab8ed
Compare
fbab8ed to
d561670
Compare
There was a problem hiding this comment.
Pull request overview
This PR fixes DROP TSMA IF EXISTS behavior so that dropping a non-existent TSMA no longer fails, and adds regression coverage to ensure both the error-on-missing (without IF EXISTS) and no-op (with IF EXISTS) semantics behave correctly.
Changes:
- Update TSMA drop translation to treat “TSMA not exist” as success when
IF EXISTSis specified. - Extend TSMA test cases to validate repeated drops fail normally, while
DROP TSMA IF EXISTS ...succeeds.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
source/libs/parser/src/parTranslater.c |
Makes translateDropTSMA return success (no cmd message) when TSMA is missing and IF EXISTS was used. |
test/cases/19-TSMAs/test_tsma.py |
Adds assertions for post-drop error behavior and validates DROP TSMA IF EXISTS is a successful no-op. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
Issue(s)
Checklist
Please check the items in the checklist if applicable.