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

Wrap join on with list #866

Merged
merged 3 commits into from
Feb 21, 2024
Merged

Conversation

pcapel
Copy link
Contributor

@pcapel pcapel commented Feb 21, 2024

Overview

Use List.wrap/1 to wrap the :on option to join/3 allowing users to give a single column without raising a match error from the case within join/3.

Fixes #865

@@ -2291,6 +2291,19 @@ defmodule Explorer.DataFrameTest do
assert_raise ArgumentError, msg, fn -> DF.join(left, right, how: :inner_join) end
end

test "with matching column indexes as single value" do
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 pulled the simplest test from within the existing tests to create a base case covering the expected behavior. Not sure if there are any edge cases worth covering, but this clearly demonstrates a red/green on the desired case from my end.

Copy link
Member

Choose a reason for hiding this comment

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

I think this is enough! Thanks!

Copy link
Member

@cigrainger cigrainger left a comment

Choose a reason for hiding this comment

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

LGTM! ❤️

Copy link
Member

@philss philss left a comment

Choose a reason for hiding this comment

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

Cool! Thank you!

@@ -2291,6 +2291,19 @@ defmodule Explorer.DataFrameTest do
assert_raise ArgumentError, msg, fn -> DF.join(left, right, how: :inner_join) end
end

test "with matching column indexes as single value" do
Copy link
Member

Choose a reason for hiding this comment

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

I think this is enough! Thanks!

@philss philss merged commit 6312461 into elixir-explorer:main Feb 21, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support single on option in Dataframe.join
3 participants