Skip to content

feat: add unordered sql compilation #156

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

Merged
merged 19 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'github/main' into orderingmode3
  • Loading branch information
TrevorBergeron committed Nov 8, 2023
commit 2481959fe63b9fcf605f597e5600eaaaf32c67ef
1 change: 1 addition & 0 deletions bigframes/core/compile/single_column.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ def join_by_column_unordered(
"left",
"outer",
"right",
"cross",
],
allow_row_identity_join: bool = True,
) -> compiled.UnorderedIR:
Expand Down
16 changes: 11 additions & 5 deletions tests/system/small/test_dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -1839,11 +1839,17 @@ def test_join_param_on(scalars_dfs, how):
bf_df_a = bf_df_a.assign(rowindex_2=bf_df_a["rowindex_2"] + 2)
bf_df_b = bf_df[["float64_col"]]

pd_df_a = pd_df[["string_col", "int64_col", "rowindex_2"]]
pd_df_a = pd_df_a.assign(rowindex_2=pd_df_a["rowindex_2"] + 2)
pd_df_b = pd_df[["float64_col"]]
pd_result = pd_df_a.join(pd_df_b, on="rowindex_2", how=how)
assert_pandas_df_equal(bf_result, pd_result, ignore_order=True)
if how == "cross":
with pytest.raises(ValueError):
bf_df_a.join(bf_df_b, on="rowindex_2", how=how)
else:
bf_result = bf_df_a.join(bf_df_b, on="rowindex_2", how=how).to_pandas()

pd_df_a = pd_df[["string_col", "int64_col", "rowindex_2"]]
pd_df_a = pd_df_a.assign(rowindex_2=pd_df_a["rowindex_2"] + 2)
pd_df_b = pd_df[["float64_col"]]
pd_result = pd_df_a.join(pd_df_b, on="rowindex_2", how=how)
assert_pandas_df_equal(bf_result, pd_result, ignore_order=True)


@pytest.mark.parametrize(
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.