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

refactor(ir): impure values are never dereferencible #9023

Merged
merged 1 commit into from Apr 22, 2024

Conversation

kszucs
Copy link
Member

@kszucs kszucs commented Apr 19, 2024

All impure values passed to the API methods are treated as separate impure invocations:

impure = ibis.random()
t1 = t.mutate(y=impure)
t2 = t1.mutate(z=impure.cast("string"))

now produce

r0 := UnboundTable: unbound_table_0
  a int64
  b string

r1 := Project[r0]
  a: r0.a
  b: r0.b
  y: RandomScalar()

Project[r1]
  a: r1.a
  b: r1.b
  y: r1.y
  z: Cast(RandomScalar(), to=string)

@cpcloud cpcloud added this to the 9.0 milestone Apr 19, 2024
@cpcloud cpcloud added the refactor Issues or PRs related to refactoring the codebase label Apr 19, 2024
@kszucs kszucs merged commit 33286f2 into ibis-project:main Apr 22, 2024
85 checks passed
@kszucs kszucs deleted the impure-semantics branch April 22, 2024 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Issues or PRs related to refactoring the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants