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

Refactor!: treat Nullable as an arg instead of a DataType.TYPE #4094

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

georgesittas
Copy link
Collaborator

Motivation behind this PR is that nullable types are awkward to deal with: to access the wrapped type, one has to always do data_type.this instead of just data_type, meaning that the concept of nullability "leaks" into third-party code that may not care at all about it.

This refactor encodes nullability as an arg in DataType, so that it's less intrusive. Now, it will be taken into account when e.g. comparing data types (which can be optionally turned off by using is_type), and when roundtripping CH code.

@georgesittas georgesittas merged commit 9c527b5 into main Sep 9, 2024
6 checks passed
@georgesittas georgesittas deleted the jo/refactor_nullable_types branch September 9, 2024 16:42
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