-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
builtins: array builtins handle mismatched tuple types #70606
Conversation
For some cases, we need to propogate the error and return it nicely for the user. See next commit. Release note: None
Drive-by suggestion: maybe it would be simpler to add a panic-catcher specifically when comparing something with arrays? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm really hesitant on panic catchers and rather we catch em explicitly.
there have been cases (e.g. spatial) where i wanted an error with Compare but never bothered, might as well begin the pain of ripping off the bandaid...
up to rafi too though. the changes here lgtm :)
tftr! bors r=otan |
Build failed: |
whoops i missed the github ci failure |
Since these builtins take in AnyTuple, the tuple contents aren't type-checked. Instead, we must handle any errors that occur during tuple comparison at execution-time. This matches the PostgresSQL behavior. No release note since this bug was never released anywhere. Release note: None
df40d43
to
dda6518
Compare
bors r=otan |
1 similar comment
bors r=otan |
Already running a review |
Build succeeded: |
fixes #70481
fixes #70480
fixes #70479
fixes #70478
fixes #70477
fixes #70476
The first commit is a refactor to add a new CompareError method
to Datum. It propagates errors instead of panicking.
Since these builtins take in AnyTuple, the tuple contents aren't
type-checked. Instead, we must handle any errors that occur during tuple
comparison at execution-time. This matches the PostgresSQL behavior.
No release note since this bug was never released anywhere.
Release note: None