Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-stan committed Oct 6, 2023
1 parent 73e7ee2 commit d3ef22a
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/snowflake/snowpark/mock/plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,18 +330,6 @@ def execute_mock_plan(

# Compute drop duplicates
res_df = res_df.drop_duplicates()
elif operator == INTERSECT:
# Dedup all none rows
if res_df.isnull().all(axis=1).where(lambda x: x).count() > 1:
res_df = res_df.drop(index=res_df.isnull().all(axis=1).index[1:])

# Keep all none rows in res_df if there are all none rows in cur_df
keep_nones = cur_df.isnull().all(axis=1).any()

res_df = res_df[
(res_df.isin(cur_df.values.ravel()).all(axis=1)).values
| (keep_nones & res_df.isnull().all(axis=1).values)
].drop_duplicates()
else:
raise NotImplementedError(
f"[Local Testing] SetStatement operator {operator} is currently not implemented."
Expand Down

0 comments on commit d3ef22a

Please sign in to comment.