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: sample(frac=...) on SQL. #1425

Closed
wants to merge 5 commits into from

Conversation

kwmsmith
Copy link
Member

Have to add a from_obj clause inside the sub-select.

@sandhujasmine please try this against your datasets.

Have to add a `from_obj` clause inside the sub-select.
@kwmsmith kwmsmith added this to the 0.10 milestone Feb 19, 2016
symbol, transform, summary, by, sin, join,
floor, cos, merge, nunique, mean, sum, count, exp, datetime as bz_datetime
)
from blaze.compute.sql import (compute, select, lower_column, compute_up,
Copy link
Member

Choose a reason for hiding this comment

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

I have a style request: can we put parenthesized imports on their own lines sorted alphabetically like:

from a import (
    b,
    c,
)

I have been updating these as I see them. The reason I prefer this style is that it makes it very easy to trace imports visually and understand where names are coming from. As it is now it is hard to quickly see what names are available, or the fact that sum is being aliased here.

If you have strong feeling about this please let me know,

@sandhujasmine
Copy link

@kwmsmith - It doesn't appear to be subsampling now. See below.

In [7]: odo(compute(sub_parts.nrows, prsx), int)
Out[7]: 40040

In [8]: odo(compute(sub_parts.sample(frac=0.75).nrows, prsx), int)
Out[8]: 40040

Also added a failing test in blaze.

Seems like Data interface is working correctly, but Symbol interface is not - some inconsistency here.

@kwmsmith
Copy link
Member Author

Closing, as this is subsumed by #1452.

@kwmsmith kwmsmith closed this Mar 18, 2016
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

3 participants