Title: `TrinoOfflineStore` does not cleanup temporary tables · Issue #6306 · feast-dev/feast · GitHub
Open Graph Title: `TrinoOfflineStore` does not cleanup temporary tables · Issue #6306 · feast-dev/feast
X Title: `TrinoOfflineStore` does not cleanup temporary tables · Issue #6306 · feast-dev/feast
Description: Expected Behavior Temporary entity tables created during get_historical_features() should be cleaned up after the retrieval job completes, consistent with how BigQuery, Redshift, and Athena handle it. Current Behavior Each call to get_hi...
Open Graph Description: Expected Behavior Temporary entity tables created during get_historical_features() should be cleaned up after the retrieval job completes, consistent with how BigQuery, Redshift, and Athena handle ...
X Description: Expected Behavior Temporary entity tables created during get_historical_features() should be cleaned up after the retrieval job completes, consistent with how BigQuery, Redshift, and Athena handle ...
Opengraph URL: https://github.com/feast-dev/feast/issues/6306
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`TrinoOfflineStore` does not cleanup temporary tables","articleBody":"## Expected Behavior\n\nTemporary entity tables created during `get_historical_features()` should be cleaned up after the retrieval job completes, consistent with how BigQuery, Redshift, and Athena handle it.\n\n## Current Behavior\n\nEach call to `get_historical_features()` with a pandas DataFrame `entity_df` creates a permanent table (`{catalog}.{dataset}.feast_entity_df_\u003cuuid\u003e`) that is never dropped, leaking tables in the Trino catalog indefinitely.\n\n## Steps to reproduce\n\n1. This is a known issue in `TrinoOfflineStore` https://github.com/feast-dev/feast/blob/master/sdk/python/feast/infra/offline_stores/contrib/trino_offline_store/trino.py#L486 \t\n\n### Specifications\n\n- Version: 0.50+\n- Platform: Any\n- Subsystem: `TrinoOfflineStore`\n\n## Possible Solution\n\nRefactor `TrinoRetrievalJob` to accept a context manager (`query_generator`) instead of a plain query string, following the pattern used by BigQuery/Redshift/Athena, and add a `DROP TABLE IF EXISTS` in the `finally` block.","author":{"url":"https://github.com/mattiamatrix","@type":"Person","name":"mattiamatrix"},"datePublished":"2026-04-21T14:50:48.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/6306/feast/issues/6306"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:24a95dfb-c96c-4144-bd5e-d16d64f793f3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E0B8:1CB805:162D0E5:1ED1ABA:6A4DF450 |
| html-safe-nonce | 99e3a1f531472d8a53c2ec9d23f3463519b4b0ec3f9cf15186bfead0aa65f6e0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMEI4OjFDQjgwNToxNjJEMEU1OjFFRDFBQkE6NkE0REY0NTAiLCJ2aXNpdG9yX2lkIjoiNDM2OTE2NTIxMTQ2Mzk3MTkyMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3ad0b4a9b63d1b10394cb2159c98aba7d25c40db1f3ff5b4809bb1455283480c |
| hovercard-subject-tag | issue:4303416773 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/feast-dev/feast/6306/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e8ce7ba764d801c56ebdfbd374220a1bd054d26f77477b5f320e0b1da27145c1/feast-dev/feast/issues/6306 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e8ce7ba764d801c56ebdfbd374220a1bd054d26f77477b5f320e0b1da27145c1/feast-dev/feast/issues/6306 |
| og:image:alt | Expected Behavior Temporary entity tables created during get_historical_features() should be cleaned up after the retrieval job completes, consistent with how BigQuery, Redshift, and Athena handle ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mattiamatrix |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5818716c93c6a2925b815402541a32814e43a7b1261c322b0c2df75224289566 |
| turbo-cache-control | no-preview |
| go-import | github.com/feast-dev/feast git https://github.com/feast-dev/feast.git |
| octolytics-dimension-user_id | 57027613 |
| octolytics-dimension-user_login | feast-dev |
| octolytics-dimension-repository_id | 161133770 |
| octolytics-dimension-repository_nwo | feast-dev/feast |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 161133770 |
| octolytics-dimension-repository_network_root_nwo | feast-dev/feast |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f4bb89367ca678f057d79b1abc45d6675b1bd5b2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width