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: add ability to DROP custom types #3281

Merged
merged 2 commits into from
Aug 29, 2019
Merged

Conversation

agavra
Copy link
Contributor

@agavra agavra commented Aug 28, 2019

Description

Drops a previously registered type. This does not affect any previously issued commands or custom types (e.g. if I have CREATE TYPE B AS STRUCT<A> and A is STRING, dropping A will not affect B, which remains STRUCT<STRING>)

Testing done

ksql> CREATE TYPE ADDRESS AS STRUCT<number INTEGER, street VARCHAR, city VARCHAR>;

 Message
-------------------------------------------------------------------------------------------------
 Registered alias ADDRESS with SQL type STRUCT<`NUMBER` INTEGER, `STREET` STRING, `CITY` STRING>
-------------------------------------------------------------------------------------------------
ksql> SHOW TYPES;

 Type Name | Schema
----------------------------------------------------------------------------------
 ADDRESS   | STRUCT<NUMBER INTEGER, STREET VARCHAR(STRING), CITY VARCHAR(STRING)>
----------------------------------------------------------------------------------
ksql> DROP TYPE ADDRESS;

 Message
------------------------
 Dropped type 'ADDRESS'
------------------------
ksql> SHOW TYPES;

 Type Name | Schema
--------------------
--------------------

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 #")

@agavra agavra requested a review from a team as a code owner August 28, 2019 17:50
@agavra agavra requested review from rodesai and a team August 29, 2019 18:34
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

@spena spena requested a review from a team August 29, 2019 20:01
@agavra agavra merged commit 32005ed into confluentinc:master Aug 29, 2019
@agavra agavra deleted the drop_types branch August 29, 2019 22:46
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.

3 participants