Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support IF NOT EXISTS on CREATE TYPE #6173

Merged
merged 3 commits into from
Sep 11, 2020

Conversation

jzaralim
Copy link
Contributor

@jzaralim jzaralim commented Sep 10, 2020

Description

Added support for new syntax: CREATE TYPE [IF NOT EXISTS] foo AS bar. Addresses #5991

If IF NOT EXISTS is included in the query, then creating a type that already exists will return the following message:

 Message
--------------------------------------------
 FOO is already registered with type STRING
--------------------------------------------

If not, then this error will be thrown:

Cannot register custom type 'WOW' since it is already registered with type: STRING

Testing done

Added unit tests and manually tested

Reviewer checklist

  • Ensure docs are updated if necessary. (eg. if a user visible feature is being added or changed).
  • Ensure relevant issues are linked (description should include text like "Fixes #")

@jzaralim jzaralim requested a review from a team as a code owner September 10, 2020 00:47
@jzaralim jzaralim requested a review from spena September 10, 2020 00:48
Copy link
Member

@spena spena left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks

@spena spena merged commit a0f381b into confluentinc:master Sep 11, 2020
@jzaralim jzaralim deleted the issue-5991 branch September 11, 2020 16:58
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.

2 participants