Daft icon indicating copy to clipboard operation
Daft copied to clipboard

Expression.pow

Open MarcoGorelli opened this issue 5 months ago • 11 comments

Is your feature request related to a problem?

Daft support in Narwhals

Describe the solution you'd like

daft.col('a').pow(2), or daft.col('a') ** 2

Describe alternatives you've considered

No response

Additional Context

No response

Would you like to implement a fix?

No

MarcoGorelli avatar Jul 04 '25 13:07 MarcoGorelli

I actually ended up implementing this partially for skew, so I can finish it off soon. Will assign to myself

srilman avatar Jul 07 '25 20:07 srilman

I'm going to keep the PR open (https://github.com/Eventual-Inc/Daft/pull/4716) for now. Anyone who's interested in this task, feel free to use the PR as a starting point.

srilman avatar Aug 06 '25 01:08 srilman

Assigning to @ykdojo as a first task!

jaychia avatar Aug 26 '25 22:08 jaychia

For everyone here - I may not have time to work on it for the next few weeks, so pls feel free to take it if I don't get to it

ykdojo avatar Sep 15 '25 17:09 ykdojo

Can I take a stab at this one?

kliwongan avatar Sep 17 '25 05:09 kliwongan

@kliwongan pls go ahead!

ykdojo avatar Sep 17 '25 06:09 ykdojo

Hi @kliwongan! How is development going?

malcolmgreaves avatar Oct 26 '25 23:10 malcolmgreaves

Hello there @malcolmgreaves! I paused for a while but recently got back into it and am a bit stuck, not sure what more I should do here; wondering if there are similar PRs for reference.

kliwongan avatar Oct 27 '25 00:10 kliwongan

@kliwongan do you mind opening a draft PR of what you have so far so we can take a look, maybe add some comments?

srilman avatar Oct 27 '25 17:10 srilman

Oh yes, it's actually already opened here, I mentioned it earlier in the issue: #5237

kliwongan avatar Oct 29 '25 00:10 kliwongan

Overall the PR looks good @kliwongan. I think the last thing is adding tests of pow running on input. It looks like similar tests are in tests/recordbatch/numeric/test_numeric.py and maybe also test/expressions/typing/test_arithmetic.py. I think once those are added, it should be ready!

srilman avatar Oct 30 '25 17:10 srilman

@colin-ho can we mark this as done?

srilman avatar Dec 03 '25 18:12 srilman

Completed in https://github.com/Eventual-Inc/Daft/pull/5237

colin-ho avatar Dec 03 '25 18:12 colin-ho