X Tutup
Skip to content

perf(postgres): Optimizing feast offline Store for date-range multi-FV retrieval#6057

Open
Vperiodt wants to merge 8 commits intofeast-dev:masterfrom
Vperiodt:patch-query
Open

perf(postgres): Optimizing feast offline Store for date-range multi-FV retrieval#6057
Vperiodt wants to merge 8 commits intofeast-dev:masterfrom
Vperiodt:patch-query

Conversation

@Vperiodt
Copy link

@Vperiodt Vperiodt commented Mar 4, 2026

What this PR does / why we need it:

  1. Replaces the date-range multi-FV path in the Postgres offline store (previously base_entities + one LEFT JOIN LATERAL per feature view) with a set-based LOCF (Last Observation Carried Forward) implementation

  2. Uses a single timeline: stack (UNION ALL of spine + feature rows), COUNT for group boundaries, FIRST_VALUE for forward-fill, then filter to spine and apply per-FV TTL.

Which issue(s) this PR fixes:

Fixes slow get_historical_features on the Postgres offline store for date-range retrieval with multiple feature views. The LATERAL/inequality joins had O(N×M) cost. This PR switches to a LOCF path: one stacked timeline of size L, sort O(L log L), and O(L) window passes, which makes total cost as O(L log L).

Misc


Open with Devin

Signed-off-by: Vanshika Vanshika <vvanshik@redhat.com>

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
@Vperiodt Vperiodt marked this pull request as ready for review March 4, 2026 07:06
@Vperiodt Vperiodt requested a review from a team as a code owner March 4, 2026 07:06
devin-ai-integration[bot]

This comment was marked as resolved.

@tokoko
Copy link
Collaborator

tokoko commented Mar 4, 2026

@Vperiodt thanks for the PR. if it's not too much trouble, can you give a small example of result queries for say.. 2 fv scenario and highlight differences this PR introduces? there jinja templates are hard enough to read through even when one knows what the intent is 😄

@Vperiodt
Copy link
Author

Vperiodt commented Mar 4, 2026

@Vperiodt thanks for the PR. if it's not too much trouble, can you give a small example of result queries for say.. 2 fv scenario and highlight differences this PR introduces? there jinja templates are hard enough to read through even when one knows what the intent is 😄

sure ! will add it in the description itself

Vperiodt and others added 3 commits March 4, 2026 16:38
Signed-off-by: Vanshika Vanshika <vvanshik@redhat.com>

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
Signed-off-by: Vanshika Vanshika <vvanshik@redhat.com>

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
devin-ai-integration[bot]

This comment was marked as resolved.

@Vperiodt Vperiodt marked this pull request as draft March 5, 2026 17:18
Vperiodt and others added 3 commits March 9, 2026 10:43
Signed-off-by: Vanshika Vanshika <vvanshik@redhat.com>

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
@Vperiodt Vperiodt marked this pull request as ready for review March 9, 2026 21:20
devin-ai-integration[bot]

This comment was marked as resolved.

Signed-off-by: Vanshika Vanshika <vvanshik@redhat.com>

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

X Tutup