SNOW-1413730: predicate for join doesn't seem to support null values in left side of == operator
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- data-engineering, databases
Research direction
Start by reproducing test_get_submitted_reviews_for_user in tests/manager_app_utils/manager_models/test_ma_sr.py, focusing on the get_submitted_reviews_for_user entry point and its chained joins. Trace how join predicates handle null values on the left side of ==, then verify that the join results can be shown without the NaN-to-bool error.
Written by the indexing model from the issue text.
Description
Please answer these questions before submitting your issue. Thanks!
- What version of Python are you using?
Python 3.10.11
- What are the Snowpark Python and pandas versions in the environment?
pandas==2.2.2
pandas-stubs==2.2.1.240316
snowflake-snowpark-python==1.15.0
- What did you do?
def get_submitted_reviews_for_user(
user_email: str,
filter: dict,
page_size: int = DEFAULT_PAGE_SIZE,
page_number: int = 0,
) -> pd.DataFrame:
session = db.init_connection("snowflake")
offset = get_offset(
page_size,
page_number,
)
df_reviews = session.table(REVIEW_DATA_TABLE)
df_lookback_answers = session.table(LOOKBACK_ANSWERS_TABLE)
df_review_submissions = session.table(REVIEW_SUBMISSIONS_LATEST_VIEW).filter(
(col("manager_email") == lit(user_email))
)
print("before the join")
df_reviews_joined = (
df_reviews.join(
right=df_review_submissions,
on="id",
how="left",
rsuffix="_submitted",
)
.join(
df_lookback_answers,
(
(col("lookback_whygrantthen_id") == df_lookback_answers["id"])
| (
col("lookback_whygrantthen_id_submitted")
== df_lookback_answers["id"]
)
),
join_type="left",
lsuffix="_wt",
)
.join(
df_lookback_answers,
(col("lookback_whyrevokenow_id") == df_lookback_answers["id"])
| (col("lookback_whyrevokenow_id_submitted") == df_lookback_answers["id"]),
join_type="left",
lsuffix="_wn",
)
)
df_reviews_joined.show() # Fails on this statement
Fails with error:
FAILED tests/manager_app_utils/manager_models/test_ma_sr.py::test_get_submitted_reviews_for_user - ValueError: cannot convert float NaN to bool
- What did you expect to see?
We expect to see the results of the JOIN.
- Dominant language
- Python
- Stars
- 341
- Forks
- 155
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 27
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from snowflakedb/snowpark-python
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
snowflakedb/snowpark-python#4333 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
snowflakedb/snowpark-python#3873 · 1 comment ·
-
bug status-triage_done
snowflakedb/snowpark-python#4228 · 2 comments · 1 reaction · 2 assignees ·
-
status-triage_done
snowflakedb/snowpark-python#4220 · 4 comments · 1 reaction · 2 assignees ·
-
bug local testing status-triage_done
snowflakedb/snowpark-python#4111 · 1 comment · 2 assignees ·
All issues in snowflakedb/snowpark-python
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100