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

FEAT: Add support for Union in PySpark backend #2270

Merged
merged 3 commits into from
Jul 14, 2020

Conversation

timothydijamco
Copy link
Contributor

Add a compilation function for the Union node in the PySpark backend (roughly mirroring the execution function for Union in the Pandas backend).

Testing

Added a new test in pyspark/tests/test_basic.py to test the compilation function (exposed by union in the table API)

@@ -163,6 +163,25 @@ def test_filter(client, filter_fn, expected_fn):
tm.assert_frame_equal(result.toPandas(), expected.toPandas())


@pytest.mark.parametrize('distinct', [False, True])
def test_union(client, distinct):
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have union tests under tests/all?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I can move this test to tests/all actually

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I created a new union test in tests/all and removed the union test in the PySpark backend I was originally going to add. I also removed the existing basic union tests in the Pandas and Postgres backends

ibis/pyspark/tests/test_basic.py Outdated Show resolved Hide resolved
@icexelloss icexelloss added the pyspark The Apache PySpark backend label Jul 9, 2020
@icexelloss icexelloss self-assigned this Jul 9, 2020
@icexelloss
Copy link
Contributor

LGTM. Can merge if CI passes.

@timothydijamco
Copy link
Contributor Author

Rebased since CI has been fixed (in #2272)

@timothydijamco
Copy link
Contributor Author

Going to rebase again now that the CI pytest issue is fixed

@jreback jreback added this to the Next Bugfix Release milestone Jul 14, 2020
@jreback jreback merged commit 5c47ddb into ibis-project:master Jul 14, 2020
@jreback
Copy link
Contributor

jreback commented Jul 14, 2020

thanks @timothydijamco

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pyspark The Apache PySpark backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants