Title: BFV Compute-on-Read for get_historical_features() in SparkOfflineStore · Issue #6345 · feast-dev/feast · GitHub
Open Graph Title: BFV Compute-on-Read for get_historical_features() in SparkOfflineStore · Issue #6345 · feast-dev/feast
X Title: BFV Compute-on-Read for get_historical_features() in SparkOfflineStore · Issue #6345 · feast-dev/feast
Description: Is your feature request related to a problem? Please describe. When using @batch_feature_view with TransformationMode.PYTHON and the Spark offline store, calling store.get_historical_features() fails with UNRESOLVED_COLUMN errors. The PI...
Open Graph Description: Is your feature request related to a problem? Please describe. When using @batch_feature_view with TransformationMode.PYTHON and the Spark offline store, calling store.get_historical_features() fai...
X Description: Is your feature request related to a problem? Please describe. When using @batch_feature_view with TransformationMode.PYTHON and the Spark offline store, calling store.get_historical_features() fai...
Opengraph URL: https://github.com/feast-dev/feast/issues/6345
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"BFV Compute-on-Read for get_historical_features() in SparkOfflineStore","articleBody":"**Is your feature request related to a problem? Please describe.**\nWhen using @batch_feature_view with TransformationMode.PYTHON and the Spark offline store, calling store.get_historical_features() fails with UNRESOLVED_COLUMN errors. The PIT join SQL template reads directly from the raw batch_source and expects output columns (e.g., aggregated features) to exist in the source data. The BFV's Python transformation is never invoked during offline reads — only during feast materialize.\nThis forces users to either:\n- Maintain a separate ETL pipeline that pre-computes the same features the BFV defines\n- Use plain FeatureView pointing at pre-computed data, duplicating transformation logic\nThis breaks the \"define once, use everywhere\" promise of the feature store.\n\n**Describe the solution you'd like**\nIn SparkOfflineStore.get_historical_features(), before building the PIT join SQL, detect BatchFeatureView instances with a UDF. For each:\n1. Read the raw source into a Spark DataFrame\n2. Invoke the BFV's udf() function (same as SparkTransformationNode.execute() does during materialization)\n3. Register the transformed DataFrame as a Spark temp view\n4. Replace the table_subquery in the FeatureViewQueryContext with the temp view name\nThis makes the entire pipeline distributed Spark: raw read -\u003e transformation -\u003e PIT join -\u003e training data. No code duplication required.\n\n**Describe alternatives you've considered**\n\n- Pre-compute features via an external Spark job and use plain FeatureView (works but duplicates logic)\n- Set offline=True on BFVs and rely on materialized offline parquet (requires running feast materialize before training, adds operational complexity)\n- Use on_demand_feature_view for transformations (doesn't support Spark-native aggregations like groupBy)\n\n**Additional context**\nAdd any other context or screenshots about the feature request here.\n","author":{"url":"https://github.com/abhijeet-dhumal","@type":"Person","name":"abhijeet-dhumal"},"datePublished":"2026-04-29T12:37:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/6345/feast/issues/6345"}
| 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:2dd2430c-1d38-6600-0af0-0319a9777830 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DD4A:102756:1E9E038:2A35305:6A4F4761 |
| html-safe-nonce | 85cbcf7fd0f505137ad0d56b13700918bbe87a7e27696a92504c45eadf9179b9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERDRBOjEwMjc1NjoxRTlFMDM4OjJBMzUzMDU6NkE0RjQ3NjEiLCJ2aXNpdG9yX2lkIjoiNTAzOTgwNzQ5MjY5Mjg1NDYyNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2e26d54d460822d9a765a308966742ad24f68a4384113351df6bea96dd56dd38 |
| hovercard-subject-tag | issue:4350574637 |
| 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/6345/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4bbbc94ff0dbdb0bd71b9944b743658ec273839c3cde6901dbf0383c2deca162/feast-dev/feast/issues/6345 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4bbbc94ff0dbdb0bd71b9944b743658ec273839c3cde6901dbf0383c2deca162/feast-dev/feast/issues/6345 |
| og:image:alt | Is your feature request related to a problem? Please describe. When using @batch_feature_view with TransformationMode.PYTHON and the Spark offline store, calling store.get_historical_features() fai... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | abhijeet-dhumal |
| hostname | github.com |
| expected-hostname | github.com |
| None | b92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9 |
| 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 | 4b249b445842943ed31549e027f57a8ade9881ed |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width