Eventual-Inc / Daft

Distributed data engine for Python/SQL designed for the cloud, powered by Rust
https://getdaft.io
Apache License 2.0
2.34k stars 164 forks source link

`coalesce` expr #3368

Open universalmind303 opened 1 day ago

universalmind303 commented 1 day ago

Is your feature request related to a problem?

I want to coalesce a bunch of exprs to get the first non null value

Describe the solution you'd like

py

df.select(daft.coalesce(col('column_1'), col('column_2'), 0))

sql

select coalesce(column_1, column_2, 0) from df;

Describe alternatives you've considered

No response

Additional Context

No response

Would you like to implement a fix?

No