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

TST: Add failing test for GH 1423 #1424

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
3 participants
@sandhujasmine
Contributor

sandhujasmine commented Feb 19, 2016

Add failing test and mark with xfail for GH 1423

To run the test using docker provisioning.sh script, after odo PR#428 is merged; run the ./provisioning.sh and add the blaze/examples/data as a mount point for docker so it can load data into postgres.

Example:
provisioning.sh -t ~/tmp/docker/ -m ${BLAZE_PROJ_PATH}/blaze/blaze/examples/data restart

TST: Add failing test for GH 1423
Add failing test and mark with xfail.
s = odo(result, pd.DataFrame)
assert len(s) == 1
result2 = compute(t.sample(frac=0.5), sql)
assert len(s) == 14

This comment has been minimized.

@llllllllll

llllllllll Feb 19, 2016

Member

should we check that the sorted results are the same ?

This comment has been minimized.

@sandhujasmine

sandhujasmine Feb 19, 2016

Contributor

Not sure I understand - could you explain a bit more please.

The sample() method will by default do a random sampling of the data in the SQL query by invoking ORDER BY random().

In both cases we're doing a random sampling; however when using n=100 we have LIMIT defined as 100 while for frac=0.5, the LIMIT is computed as COUNT(*) * 0.5

This comment has been minimized.

@llllllllll

llllllllll Feb 19, 2016

Member

sorry, maybe I incorrectly assumed that we were doing a sample of the whole table which should just shuffle it. If this is a subset then I think that we should test that all the records exist in the base table as a sanity check that we are actually sampling correcectly.

@llllllllll

This comment has been minimized.

Member

llllllllll commented Feb 19, 2016

Thanks for adding an xfail test. This is great way to codify tracking this issue!

@kwmsmith

This comment has been minimized.

Member

kwmsmith commented Mar 18, 2016

Closing as this is subsumed in #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