Repository navigation
fix drop publication if exists statement - #16449
Conversation
|
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. PR Review 🔍
|
|
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. PR Code Suggestions ✨
|
fix drop publication if exists statement ___ ### **PR Type** Bug fix, Tests ___ ### **Description** - Added condition to handle `IF EXISTS` clause in `DROP PUBLICATION` statement to prevent internal errors when the publication does not exist. - Added tests to verify the behavior of the `DROP PUBLICATION IF EXISTS` statement. - Included setup and teardown steps in the test cases to ensure proper testing environment. ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Bug fix </strong></td><td><table> <tr> <td> <details> <summary><strong>authenticate.go</strong><dd><code>Handle `IF EXISTS` clause in `DROP PUBLICATION` statement</code></dd></summary> <hr> pkg/frontend/authenticate.go <li>Added condition to handle <code>IF EXISTS</code> clause in <code>DROP PUBLICATION</code> <br>statement.<br> <li> Prevented internal error when publication does not exist and <code>IF EXISTS</code> <br>is specified.<br> </details> </td> <td><a href="https://github.com/matrixorigin/matrixone/pull/16449/files#diff-849f201c351210bd95807e99d1538e2602a5244b256c35e58467afe304c509e6">+5/-1</a> </td> </tr> </table></td></tr><tr><td><strong>Tests </strong></td><td><table> <tr> <td> <details> <summary><strong>pub_sub2.result</strong><dd><code>Add tests for `DROP PUBLICATION IF EXISTS` statement</code> </dd></summary> <hr> test/distributed/cases/tenant/pub_sub2.result <li>Added tests for <code>DROP PUBLICATION IF EXISTS</code> statement.<br> <li> Verified behavior when publication does not exist.<br> </details> </td> <td><a href="https://github.com/matrixorigin/matrixone/pull/16449/files#diff-b8d12747873e9eca46444acc746b3157e5715dcee599fa5353c036a19b550b13">+7/-0</a> </td> </tr> <tr> <td> <details> <summary><strong>pub_sub2.sql</strong><dd><code>Add SQL commands to test `DROP PUBLICATION IF EXISTS`</code> </dd></summary> <hr> test/distributed/cases/tenant/pub_sub2.sql <li>Added SQL commands to test <code>DROP PUBLICATION IF EXISTS</code>.<br> <li> Included setup and teardown steps for the test.<br> </details> </td> <td><a href="https://github.com/matrixorigin/matrixone/pull/16449/files#diff-d185c58ec352113c102571a08f1f6b69a4cb33e75b69c5d6ed221cbc47c7df91">+12/-1</a> </td> </tr> </table></td></tr></tr></tbody></table> ___ > 💡 **PR-Agent usage**: >Comment `/help` on the PR to get a list of all available PR-Agent tools and their descriptions Approved by: @daviszhen, @heni02
fix drop publication if exists statement ___ ### **PR Type** Bug fix, Tests ___ ### **Description** - Added condition to handle `IF EXISTS` clause in `DROP PUBLICATION` statement to prevent internal errors when the publication does not exist. - Added tests to verify the behavior of the `DROP PUBLICATION IF EXISTS` statement. - Included setup and teardown steps in the test cases to ensure proper testing environment. ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Bug fix </strong></td><td><table> <tr> <td> <details> <summary><strong>authenticate.go</strong><dd><code>Handle `IF EXISTS` clause in `DROP PUBLICATION` statement</code></dd></summary> <hr> pkg/frontend/authenticate.go <li>Added condition to handle <code>IF EXISTS</code> clause in <code>DROP PUBLICATION</code> <br>statement.<br> <li> Prevented internal error when publication does not exist and <code>IF EXISTS</code> <br>is specified.<br> </details> </td> <td><a href="https://github.com/matrixorigin/matrixone/pull/16449/files#diff-849f201c351210bd95807e99d1538e2602a5244b256c35e58467afe304c509e6">+5/-1</a> </td> </tr> </table></td></tr><tr><td><strong>Tests </strong></td><td><table> <tr> <td> <details> <summary><strong>pub_sub2.result</strong><dd><code>Add tests for `DROP PUBLICATION IF EXISTS` statement</code> </dd></summary> <hr> test/distributed/cases/tenant/pub_sub2.result <li>Added tests for <code>DROP PUBLICATION IF EXISTS</code> statement.<br> <li> Verified behavior when publication does not exist.<br> </details> </td> <td><a href="https://github.com/matrixorigin/matrixone/pull/16449/files#diff-b8d12747873e9eca46444acc746b3157e5715dcee599fa5353c036a19b550b13">+7/-0</a> </td> </tr> <tr> <td> <details> <summary><strong>pub_sub2.sql</strong><dd><code>Add SQL commands to test `DROP PUBLICATION IF EXISTS`</code> </dd></summary> <hr> test/distributed/cases/tenant/pub_sub2.sql <li>Added SQL commands to test <code>DROP PUBLICATION IF EXISTS</code>.<br> <li> Included setup and teardown steps for the test.<br> </details> </td> <td><a href="https://github.com/matrixorigin/matrixone/pull/16449/files#diff-d185c58ec352113c102571a08f1f6b69a4cb33e75b69c5d6ed221cbc47c7df91">+12/-1</a> </td> </tr> </table></td></tr></tr></tbody></table> ___ > 💡 **PR-Agent usage**: >Comment `/help` on the PR to get a list of all available PR-Agent tools and their descriptions Approved by: @daviszhen, @heni02
User description
What type of PR is this?
Which issue(s) this PR fixes:
issue #16447
What this PR does / why we need it:
fix drop publication if exists statement
PR Type
Bug fix, Tests
Description
IF EXISTSclause inDROP PUBLICATIONstatement to prevent internal errors when the publication does not exist.DROP PUBLICATION IF EXISTSstatement.Changes walkthrough 📝
authenticate.go
Handle `IF EXISTS` clause in `DROP PUBLICATION` statementpkg/frontend/authenticate.go
IF EXISTSclause inDROP PUBLICATIONstatement.
IF EXISTSis specified.
pub_sub2.result
Add tests for `DROP PUBLICATION IF EXISTS` statementtest/distributed/cases/tenant/pub_sub2.result
DROP PUBLICATION IF EXISTSstatement.pub_sub2.sql
Add SQL commands to test `DROP PUBLICATION IF EXISTS`test/distributed/cases/tenant/pub_sub2.sql
DROP PUBLICATION IF EXISTS.