Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on May 17, 2024. It is now read-only.

Remove UUID-type inference for textual columns #852

Conversation

Copy link
Contributor

@vvkh vvkh commented Jan 12, 2024
edited
Loading

We have to be 100% sure that all the values in a textual column are valid UUIDs if we want to treat it as native UUID. Otherwise, the diff may crash when we are converting an invalid UUID to a number. Therefore, inferring the UUID type from a sample is not reliable enough. The PR removes the inference.

Only 1 potential case is affected, when a native UUID column is being compared with a textual column with UUID strings. This won't work out of the box anymore, but it will still be possible with explicit cast in a view. Other cases are covered by alphanumeric PK support.

Before the change

Column A \ Column B Native UUID Text (only UUID) Text (only alphanum) Text (arbitrary)
Native UUID ✅ (as UUID)
Text (only UUID) ✅ (as UUID) ✅ (as UUID) ✅ (as alphanum)
Text (only alphanum) ✅ (as alphanum)
Text (arbitrary)

After the change

Column A \ Column B Native UUID Text (only UUID) Text (only alphanum) Text (arbitrary)
Native UUID ❌ (but possible with explicit cast)
Text (only UUID) ❌ (but possible with explicit cast) ✅ (as alphanum) ✅ (as alphanum)
Text (only alphanum) ✅ (as alphanum)
Text (arbitrary)

@vvkh vvkh marked this pull request as ready for review January 12, 2024 16:39
@vvkh vvkh requested review from nolar and dlawin January 12, 2024 16:44
Copy link
Contributor

This pull request has been marked as stale because it has been open for 60 days with no activity. If you would like the pull request to remain open, please comment on the pull request and it will be added to the triage queue. Otherwise, it will be closed in 7 days.

@github-actions github-actions bot added the stale Issues/PRs that have gone stale label Mar 18, 2024
Copy link
Contributor

Although we are closing this pull request as stale, it's not gone forever. PRs can be reopened if there is renewed community interest. Just add a comment and it will be reopened for triage.

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

@nolar nolar Awaiting requested review from nolar

@dlawin dlawin Awaiting requested review from dlawin

Assignees
No one assigned
Labels
stale Issues/PRs that have gone stale
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /