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
Fix hash join non compat issues #3168
Conversation
@alamb I'm trying to create a block that can coerce and cast left and right ArrayRefs returning casted ones. This can be useful in different places where 2 castable but not same datatypes involved. Example |
I think a good approach might be to have the cast part of the logical planner, so the join expression becomes in the form I believe we should already have most of the logic there for casting to a common type for expressions. |
Yes, that is something we discussed with @alamb, that other sql engines have cast as part of planner if join arms are not the same datatype but still castable. So what your idea @Dandandan, to try move cast into the planner? |
Oh I see, there is a |
Thanks @Dandandan -- yes I think |
@Dandandan @alamb is anywhere documentation on planner? I have implemented the cast in planner in |
I don't know of any real documentation on the planner Note there is a discussion about the current location of inserting type coercion, which is currently in the physical planner rather than the logical planner) on #3031 with @andygrove and @liukun4515 Perhaps this is another example / rationale to move calling the type coercion logic from the physical planner to the logical planner 🤔 |
I will take a look this pr and issue later today or tomorrow |
Thanks @alamb @liukun4515 |
Thank you @comphead , We discussed about the migration the coercion rule from physical phase to logical phase #3031 and other issue. But I need to take look at this issue and pr first, how and where to migrate the coercion is another thing. |
Closing as this PR is over a year old. Please feel free to reopen it / rebase it if you plan to keep working on it |
Which issue does this PR close?
Closes #2877 .
Rationale for this change
Currently hash join fails if two arms has different but castable avlues.
What changes are included in this PR?
The entire idea is to try to cast automatically values if possible.
Are there any user-facing changes?