-
Notifications
You must be signed in to change notification settings - Fork 605
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
feat: make Table.cache()
a no-op for tables that are already concrete in a backend
#6195
Comments
@jcrist I can't remember, are we not already doing this? |
We are not. |
This is easy to do if we assume that However, this assumption isn't true, since some backends (e.g. duckdb) return views for A few options:
Neither seems terribly onerous (mostly just plumbing), but the latter is much less invasive. |
I'm going to try implementing the latter (probably for a small subset of backends to start) and see how it looks. I think this should be doable without being too invasive. |
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.The text was updated successfully, but these errors were encountered: