Skip to content

fix: Allow float('nan') as value in join for duckdb#3555

Merged
FBruzzesi merged 3 commits intomainfrom
fix/issue-3554
May 4, 2026
Merged

fix: Allow float('nan') as value in join for duckdb#3555
FBruzzesi merged 3 commits intomainfrom
fix/issue-3554

Conversation

@FBruzzesi
Copy link
Copy Markdown
Member

Description

It does not fully solve the issue but:

  • Solves it for duckdb
  • Explicitly xfail for pandas-like + dask case

What type of PR is this? (check all applicable)

  • 💾 Refactor
  • ✨ Feature
  • 🐛 Bug Fix
  • 🔧 Optimization
  • 📝 Documentation
  • ✅ Test
  • 🐳 Other

Related issues

Checklist

  • Code follows style guide (ruff)
  • Tests added
  • Documented the changes

@FBruzzesi FBruzzesi added fix duckdb Issue is related to duckdb backend labels Apr 18, 2026
FBruzzesi added a commit that referenced this pull request Apr 18, 2026
Copy link
Copy Markdown
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

thanks @FBruzzesi ! looks good on green

love the attention to detail here

Comment on lines +310 to +313
# Use `==` to preserve the polars semantic of `null != null` in joins,
# and additionally match `NaN = NaN` since `==` in DuckDB treats `NaN`
# like SQL `NULL` (see https://github.com/narwhals-dev/narwhals/issues/3554).
# `isnan` is safe to apply as it returns `false` for non-float columns.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

love this comment

@FBruzzesi FBruzzesi merged commit 0d7f352 into main May 4, 2026
36 of 37 checks passed
@FBruzzesi FBruzzesi deleted the fix/issue-3554 branch May 4, 2026 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

duckdb Issue is related to duckdb backend fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants