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

Convert types to sealed classes where possible #14555

Merged
merged 1 commit into from
Oct 11, 2022

Conversation

dain
Copy link
Member

@dain dain commented Oct 10, 2022

Convert DecimalType, TimeWithTimeZoneType, and TimestampWithTimeZoneType to sealed classes

Release notes

(X) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text:

@cla-bot cla-bot bot added the cla-signed label Oct 10, 2022
Convert DecimalType, TimeWithTimeZoneType, and TimestampWithTimeZoneType
to sealed classes
@dain dain force-pushed the type-sealed-classes branch from 9d7f38e to a6744ae Compare October 11, 2022 00:01
@dain dain merged commit cf7ac01 into trinodb:master Oct 11, 2022
@dain dain deleted the type-sealed-classes branch October 11, 2022 02:50
@github-actions github-actions bot added this to the 400 milestone Oct 11, 2022
@hashhar
Copy link
Member

hashhar commented Oct 11, 2022

What's the motivation?

Does this prevent a plugin from providing specialized types for example?

@findepi
Copy link
Member

findepi commented Oct 11, 2022

Does this prevent a plugin from providing specialized types for example?

These classes were not meant to be extended and it would be dangerous if someone tried that.

extends AbstractType
implements FixedWidthType
permits LongTimestampWithTimeZoneType, ShortTimestampWithTimeZoneType
Copy link
Member

Choose a reason for hiding this comment

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

The @see LongTimestampWithTimeZoneType above became redundant

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

Successfully merging this pull request may close these issues.

4 participants