fix(join): dereference literals in values of JoinChain #9594
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.
Description of changes
Literal
s as value of aJoinChain
should be substituted through subsequent joins like in the example illustrated in #9561 .A statement like
t3 = t1.inner_join(t2, "i").select("i", lit=1)
creates aJoinChain
looking likewith one of the reference "fields" in
values
actually pointing to aLiteral
.Adding a subsequent
JoinLink
to thisJoinChain
like byt5 = t3.inner_join(t4, "i")
fails inprepare_predicates
, since theDerefMap.from_targets(..., extra=reverse)
call tries to add a substitute from the newlit
-field to theLiteral(1)
object, which does not fit theField
type, that thesubs
attribute of theDerefMap
are expected to have.Allowing also
Literal
fixes this specific example.NOTE: I am wondering if general
Value
s should be allowed.In general, I am very unsure about the greater implications.
Will think about a small test.
Issues closed