-
Notifications
You must be signed in to change notification settings - Fork 608
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(join): skip substitution of non-field references in join chains #9595
fix(join): skip substitution of non-field references in join chains #9595
Conversation
ACTION NEEDED Ibis follows the Conventional Commits specification for release automation. The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification. |
@coroa I pushed up a small test. |
Thanks! But note that the Should i extend the test for that? |
Ah, yes! |
@cpcloud What do you think about that addition to the test? |
LGTM, I have another case I want to add, pushing that here in a sec. |
Thanks for the PR! |
Doctest failure looks unrelated (table ordering instability). Thanks for the quick turn-around, it's a delight. |
Yep, failure is unrelated, and fixed in #9597. |
99a7587
to
8054db1
Compare
FYI for debugging i found it very helpful to add some simple class Field(Value):
[...]
def __repr__(self):
return f"<Field name={self.name} rel={self.rel}>" and class Relation(Node, Coercible):
[...]
def __repr__(self):
return f"<{self.__class__.__name__} fields={','.join(self.schema)}>" I saw that you have some formatting facilities with |
Description of changes
As alternative to #9594, we here avoid the same signature error raised in #9561, when a
Literal
or more generalValue
in aJoinChain
fails to be included in aDerefMap
.A statement like
t3 = t1.inner_join(t2, "i").select("i", lit=1, val=2 * t1.x)
creates aJoinChain
looking likewith one of the reference "fields" in
values
actually pointing to aLiteral
and another one to a more generalValue
.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 and fromval
to theValue
-like expression, which both do not fit theField
type, that thesubs
attribute of theDerefMap
are expected to have.Here we skip those as direct substitution possibilities.
Issues closed