Bug: DROP MACRO IF EXISTS throws when the macro does not exist · Issue #1327 · LadybugDB/ladybug · GitHub
Skip to content

Bug: DROP MACRO IF EXISTS throws when the macro does not exist #1327

Closed

Description

@zahariash

This work was produced with the help of language models.

DROP MACRO IF EXISTS on a missing macro throws, while DROP TABLE IF EXISTS and DROP SEQUENCE IF EXISTS return a message. The IF EXISTS message is appended and Catalog::dropMacro then runs anyway:

DROP MACRO IF EXISTS missing_m;     // Catalog exception: Macro missing_m doesn't exist.
DROP TABLE IF EXISTS missing_t;     // Table missing_t does not exist.
DROP SEQUENCE IF EXISTS missing_s;  // Sequence missing_s does not exist.

Expected: Macro missing_m does not exist.
Actual: Catalog exception: Macro missing_m doesn't exist.

Reproduces on 0.21.2 and main (9a23a47).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions