Title: feat: Push column projection and time-range filters down to Iceberg scans in the DuckDB and Spark offline stores · Issue #7019 · feast-dev/feast · GitHub
Open Graph Title: feat: Push column projection and time-range filters down to Iceberg scans in the DuckDB and Spark offline stores · Issue #7019 · feast-dev/feast
X Title: feat: Push column projection and time-range filters down to Iceberg scans in the DuckDB and Spark offline stores · Issue #7019 · feast-dev/feast
Description: Is your feature request related to a problem? Please describe. Follow-up to #6499 / #7005 (Polaris support, merged in #7006). Reads from an IcebergSource are always a full-table scan: DuckDB offline store: _read_iceberg_catalog_source do...
Open Graph Description: Is your feature request related to a problem? Please describe. Follow-up to #6499 / #7005 (Polaris support, merged in #7006). Reads from an IcebergSource are always a full-table scan: DuckDB offlin...
X Description: Is your feature request related to a problem? Please describe. Follow-up to #6499 / #7005 (Polaris support, merged in #7006). Reads from an IcebergSource are always a full-table scan: DuckDB offlin...
Opengraph URL: https://github.com/feast-dev/feast/issues/7019
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"feat: Push column projection and time-range filters down to Iceberg scans in the DuckDB and Spark offline stores","articleBody":"**Is your feature request related to a problem? Please describe.**\n\nFollow-up to #6499 / #7005 (Polaris support, merged in #7006). Reads from an `IcebergSource` are always a full-table scan:\n\n- DuckDB offline store: `_read_iceberg_catalog_source` does `table.scan().to_arrow()` and wraps the result in `ibis.memtable(...)`. The column selection and time-range filters that `pull_latest_from_table_or_query_ibis`, `pull_all_from_table_or_query_ibis` and `get_historical_features_ibis` apply afterwards are evaluated by DuckDB on the already-materialized table, so they never reach the Iceberg scan.\n- Spark offline store: `_register_iceberg_source_as_temp_view` does `scan().to_arrow()` and `createDataFrame(...)`, so every column of the table is loaded into the driver regardless of what the feature view uses.\n\nFor wide or large tables this means reading all columns and all partitions/files just to use a few columns in a bounded time window, which also defeats Iceberg's column projection and partition/file pruning.\n\nThe data needed to avoid this is already known where the read happens, but the reader contract is `data_source_reader(data_source, repo_path) -> Table`, which has no way to carry it:\n\n- `pull_latest_*` / `pull_all_*`: the exact columns (`join_keys + features + timestamp fields`) and `start_date` / `end_date`.\n- `get_historical_features_ibis.read_fv`: the join keys, requested feature columns and timestamp columns of each feature view, and the entity dataframe's event-timestamp range (a feature row can only matter if `timestamp \u003c= max(entity ts)`, and, with a TTL, `timestamp >= min(entity ts) - ttl`).\n\n**Describe the solution you'd like**\n\n- Add a small `DataSourceReadHints` dataclass (`columns`, `timestamp_field`, `start`, `end`) and an optional hints-aware reader alongside the existing `data_source_reader` in the ibis helpers. Existing readers (MSSQL, Oracle, file-based) keep working unchanged; offline stores that supply the hints-aware reader get pushdown.\n- DuckDB: pass the hints to `_read_iceberg_catalog_source`, which calls PyIceberg `scan(selected_fields=..., row_filter=...)`.\n - Translate Feast-side column names back to source names through `field_mapping`, and only select columns that exist in the table schema.\n - Only build a time filter when the timestamp column is an Iceberg `timestamp` / `timestamptz` (using the matching tz-aware / naive UTC literal). Otherwise skip it.\n - The filter is a pure optimization: the existing ibis filters are still applied afterwards, so results must be identical with and without pushdown.\n- Spark: prune the registered temp view to the columns the feature view needs (and apply the time bounds where the entity range is available).\n- Unit tests against a real PyIceberg `SqlCatalog` (not only mocks) that assert both the scan arguments and that results match the unpruned read; docs note.\n\n**Describe alternatives you've considered**\n\n- Predicate pushdown on entity keys (`join_key IN (...)`): potentially large win for small entity dataframes, but riskier (large IN lists, composite keys, type coercion). Left out of the first iteration.\n- Lazy scans via DuckDB's Iceberg extension instead of Arrow materialization: bigger change to how the offline store reads, and would not cover Spark.\n- Changing the `data_source_reader` signature for all readers: breaking for the MSSQL/Oracle stores that share these helpers.\n\n**Additional context**\n\nRelated: #6499, #7005, #7006. I plan to open a PR for this.\n","author":{"url":"https://github.com/haoxu0","@type":"Person","name":"haoxu0"},"datePublished":"2026-10-15T08:11:06Z","url":"https://github.com/feast-dev/feast/issues/7019"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:e942e061-c4d0-4dae-63e5-86393782f3de |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AFB2:2A4404:DC1874:1220199:6AFE9223 |
| html-safe-nonce | 61e5b9ffa8a986d9108de3eed35532cf14ee915b2c8b03d89ce7474826e9bd1a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRkIyOjJBNDQwNDpEQzE4NzQ6MTIyMDE5OTo2QUZFOTIyMyIsInZpc2l0b3JfaWQiOiI1NDYxNDg5NzE4Mjg3ODMxNTg3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 8950eeff8b0da3dfa0dd8f02d2de0e264821dacc86d382568cfcfb150c6cebad |
| hovercard-subject-tag | issue:5862541745 |
| 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/7019/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5e8d13dc76a1303f7f129ddfd208666a8c99da52959b77ac788b2daf1cf7c5a2/feast-dev/feast/issues/7019 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5e8d13dc76a1303f7f129ddfd208666a8c99da52959b77ac788b2daf1cf7c5a2/feast-dev/feast/issues/7019 |
| og:image:alt | Is your feature request related to a problem? Please describe. Follow-up to #6499 / #7005 (Polaris support, merged in #7006). Reads from an IcebergSource are always a full-table scan: DuckDB offlin... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | haoxu0 |
| hostname | github.com |
| expected-hostname | github.com |
| None | b3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86 |
| 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 | 4a10310af51a1bfffbedc4fd81cb582acf0cb0ff |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width