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

Null-safe equal expression (<=> in SQL) #3513

Open
kevinzwang opened this issue Dec 6, 2024 · 0 comments
Open

Null-safe equal expression (<=> in SQL) #3513

kevinzwang opened this issue Dec 6, 2024 · 0 comments
Labels
backlog enhancement New feature or request good first issue Good for newcomers p2 Nice to have features

Comments

@kevinzwang
Copy link
Member

Is your feature request related to a problem?

Right now it is difficult to check the equality of two expressions when we also want nulls to equal each other.

Describe the solution you'd like

Support for the <=> operator in SQL as well as an equivalent Expression in Python DataFrame-land.

It should work as follows:

>>> import daft
>>> df = daft.from_pydict({"a": [1, 2, None], "b": [1, 3, None]})
>>> daft.sql("select a <=> b from df").collect()
╭─────────╮
│ a       │
│ ---     │
│ Boolean │
╞═════════╡
│ true    │
├╌╌╌╌╌╌╌╌╌┤
│ false   │
├╌╌╌╌╌╌╌╌╌┤
│ true    │
╰─────────╯

(Showing first 3 of 3 rows)

Describe alternatives you've considered

No response

Additional Context

No response

Would you like to implement a fix?

No

@kevinzwang kevinzwang added enhancement New feature or request good first issue Good for newcomers p2 Nice to have features backlog labels Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog enhancement New feature or request good first issue Good for newcomers p2 Nice to have features
Projects
None yet
Development

No branches or pull requests

1 participant