Skip to content
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

Merged
merged 9 commits into from
Nov 21, 2015
Merged

Conversation

llllllllll
Copy link
Member

Things like a[a.a == b.a] would fail because it wouldn't compute the b.a.

return compute_up(expr, data, predicate, scope=scope, **kwargs)


@dispatch(Selection, sa.sql.ColumnElement, ClauseElement)
Copy link
Member

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?

Copy link
Member

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.

Copy link
Member Author

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?

Copy link
Member

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.

Copy link
Member Author

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, ColumnElement is fine

@llllllllll
Copy link
Member Author

looks like I broke everything. I will clean the other backends up and ping you when its passing.

@llllllllll llllllllll added the wip label Oct 14, 2015
@llllllllll llllllllll changed the title BUG: Fix selections that had inner inputs. WIP: Fix selections that had inner inputs. Oct 14, 2015
@llllllllll
Copy link
Member Author

related #1230

I need to get back to this. I haven't had much time to work on blaze recently ;_;

@llllllllll llllllllll force-pushed the select-inputs branch 3 times, most recently from e4e8914 to f692fec Compare November 4, 2015 00:03
@llllllllll
Copy link
Member Author

Hoping the tests pass. This should be ready to review so I am removing the wip tag.

@llllllllll llllllllll removed the wip label Nov 4, 2015
@llllllllll llllllllll changed the title WIP: Fix selections that had inner inputs. Fix selections that have inner inputs. Nov 4, 2015
@llllllllll
Copy link
Member Author

@cpcloud any thoughts on this? Currently using this for our deploy so it would be good to get this merged.

@llllllllll
Copy link
Member Author

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

@cpcloud
Copy link
Member

cpcloud commented Nov 20, 2015

+1 here

@llllllllll
Copy link
Member Author

+1

good to merge?

cpcloud added a commit that referenced this pull request Nov 21, 2015
Fix selections that have inner inputs.
@cpcloud cpcloud merged commit 9fc5e46 into blaze:master Nov 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants