-
Notifications
You must be signed in to change notification settings - Fork 389
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 selections that have inner inputs. #1275
Conversation
return compute_up(expr, data, predicate, scope=scope, **kwargs) | ||
|
||
|
||
@dispatch(Selection, sa.sql.ColumnElement, ClauseElement) |
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.
Should ClauseElement
be sa.sql.expression.BinaryExpression
?
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.
ClauseElement
is very general and would let basically any sqlalchemy expression in.
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.
Is BinaryExpression
too restrictive here? Are there any valid predicate functions that don't fall into this? Is there any ClauseElement
that we would not treat as a valid predicate?
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.
Yes, Selectable
is a subclass of ClauseElement
and we don't support non-column boolean expressions.
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 tried making this BinaryExpression
but it looks like there are some cases where we are getting a BooleanClauseList
. The first common parrent is ColumnElement
, does that seem restrictive enough?
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.
Yeah, ColumnElement
is fine
looks like I broke everything. I will clean the other backends up and ping you when its passing. |
aef8bec
to
4d2707f
Compare
related #1230 I need to get back to this. I haven't had much time to work on blaze recently ;_; |
e4e8914
to
f692fec
Compare
Hoping the tests pass. This should be ready to review so I am removing the wip tag. |
@cpcloud any thoughts on this? Currently using this for our deploy so it would be good to get this merged. |
5eec84c
to
573bcfb
Compare
Things like a[a.a == b.a] would fail because it wouldn't compute the b.a.
573bcfb
to
afb3b18
Compare
This is a tighter restriction because we don't want selects for the predicate.
Not sure if the tests are still failing with a 500 from binstar, any idea what caused (or is still causing) this? edit: seems fine now |
+1 here |
good to merge? |
Fix selections that have inner inputs.
Things like
a[a.a == b.a]
would fail because it wouldn't compute theb.a.