It appears that when checking for a query for an earlier cached value, PyAthena checks the string query for equality, but it doesn't appear to check query execution context (the catalog or the database) is the same as that requested. Ideally, it would only reuse the cache if the query and its context matched.
I hit this because I have a dev-and-prod setup within Athena where the same tables exist in both dev and prod environments. If I attempt to use the dev database for the same query as an earlier prod query, I get the prod results, not my dev results, which is quite confusing.
Workaround of course is to disable caching for any such queries, which is fine, but obviously not ideal.
It appears that when checking for a query for an earlier cached value, PyAthena checks the string query for equality, but it doesn't appear to check query execution context (the catalog or the database) is the same as that requested. Ideally, it would only reuse the cache if the query and its context matched.
I hit this because I have a dev-and-prod setup within Athena where the same tables exist in both dev and prod environments. If I attempt to use the dev database for the same query as an earlier prod query, I get the prod results, not my dev results, which is quite confusing.
Workaround of course is to disable caching for any such queries, which is fine, but obviously not ideal.