-
Notifications
You must be signed in to change notification settings - Fork 608
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
fix(ir): make impure ibis.random() and ibis.uuid() functions return unique node instances #8967
Conversation
ffa38da
to
813dc52
Compare
There's also |
I think this is a bug fix, since it has to do with output correctness. |
…unique node instances
I am planning to address that in a follow-up. |
Any reason why those can't be done in this PR? |
Are |
Ah, good point. I hadn't considered that Do we know whether that's true for all of our backends? |
Anyway, that's sufficiently different that I think it can be done in a follow up. |
I wouldn't be surprised if it's broken for pandas/dask/polars, but semantically I think it should be true for all backends. |
@kszucs Let me know when you want me to regen snapshots. |
We still have a problem which is definitely solvable but would expand the scope of this PR heavily: # semantically this should produce two different columns
t.select(x=ibis.random(), y=ibis.random()) # semantically this should produce identical columns
rand = ibis.random()
t.select(x=rand, y=rand) Currently we compile both as SELECT *, randcol AS x, randcol AS y FROM (SELECT *, rand() as randcol FROM ...) # where randcol name would be generated For clickhoue and mysql all the random calls produce the same value in a select, but we could also overcome that with similar strategies. |
Can that be done in a follow up? |
Definitely! That is slightly harder and we need to work around backend specifics. Yes, please regenerate the snapshots for the failing backends! |
Clouds are passing:
|
Resolves #8921