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

TST: Add failing test for GH 1423 #1424

Closed

Conversation

sandhujasmine
Copy link

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

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
Copy link
Member

Choose a reason for hiding this comment

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

should we check that the sorted results are the same ?

Copy link
Author

Choose a reason for hiding this comment

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

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

Copy link
Member

Choose a reason for hiding this comment

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

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
Copy link
Member

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

@kwmsmith
Copy link
Member

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants