feat: make Table.cache()
a no-op for tables that are already concrete in a backend #6195
Open
Description
Currently Table.cache()
will result in a new copy of the data being stored in the backend, even if the data is already a "concrete" table in the backend.
Ideally if a table is already concrete (backed by a physical table, not a view, in the corresponding backend) then table.cache()
would be a no-op. This would better enable writing generic functions that make use of .cache
without unnecessarily duplicating data.
t = con.table("my_table") # a concrete table
_ = t.cache() # a no-op
_ = t.mutate(foo=t.bar + 1).cache() # not a no-op, since `t` isn't a physical table
t = con.table("some-view") # a view
_ = t.cache() # not a no-op, since `t` is a view
Metadata
Assignees
Type
Projects
Status
backlog