You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I didn't write this code but from 80f6f90 it looks like the idea is that the statement is mutable while it's in use, perhaps at the DuckDB level. When you get the statement from the cache, the caller gets effectively exclusive use of it. But when the CachedStatement is dropped, it automatically puts itself back into the cache.
It seems a little strange compared to e.g. cloning when things are taken from the cache, or just keeping only immutable representations in the cache. But probably the C API constrains how things can be done.
Maybe I am misunderstanding the logic here but I wonder why duckdb removes the statement from the cache instead of just getting it? I would expect a call to https://paritytech.github.io/try-runtime-cli/hashlink/lru_cache/struct.LruCache.html#method.get.
https://github.com/duckdb/duckdb-rs/blame/2bd811e7b1b7398c4f461de4de263e629572dc90/crates/duckdb/src/cache.rs#L142
The text was updated successfully, but these errors were encountered: