-
Notifications
You must be signed in to change notification settings - Fork 525
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(binder): overloaded operator/function resolution with implicit arg cast #3393
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 tasks
Codecov Report
@@ Coverage Diff @@
## main #3393 +/- ##
==========================================
+ Coverage 74.31% 74.37% +0.06%
==========================================
Files 769 769
Lines 106773 107047 +274
==========================================
+ Hits 79350 79620 +270
- Misses 27423 27427 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
xiangjinwu
force-pushed
the
rust-implicit-cast-1-actual
branch
2 times, most recently
from
June 23, 2022 04:22
2e6d9db
to
24f28bb
Compare
xiangjinwu
force-pushed
the
rust-implicit-cast-1-actual
branch
from
June 23, 2022 11:25
24f28bb
to
4655f28
Compare
xiangjinwu
changed the title
feat(binder): (WIP) overloaded operator/function resolution with implicit arg cast
feat(binder): overloaded operator/function resolution with implicit arg cast
Jun 23, 2022
yezizp2012
approved these changes
Jun 24, 2022
xiangjinwu
added
the
mergify/can-merge
Indicates that the PR can be added to the merge queue
label
Jun 27, 2022
This was referenced Jun 27, 2022
3 tasks
3 tasks
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I hereby agree to the terms of the Singularity Data, Inc. Contributor License Agreement.
What's changed and what's your intention?
Implements the PostgreSQL logic of resolving overloaded operator/function:
https://www.postgresql.org/docs/current/typeconv-oper.html
https://www.postgresql.org/docs/current/typeconv-func.html
This is necessary to determine the type of literal
null
used in a function (#3149). And allows us to unify adhoc casting logic scattered in bind_xxx / rewrite_xxx / FunctionCall::new.The detailed logic of each rule is explained in doc comments. Some prior knowledge about our current type systems (subset of PostgreSQL) is listed here:
We have 13 types from 5 categories. Implicit cast is allowed in the direction of arrow within each category, and the last bolded type is the preferred type of that category.
Limitations (simplification from PostgreSQL rules):
select int4(null);
Note thatselect int(null);
is invalid in PostgreSQL as well.Checklist
./risedev check
(or alias,./risedev c
)Refer to a related PR or issue link (optional)