Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does BigQuery template query take advantage of Partitions? #2083

Closed
judahrand opened this issue Nov 22, 2021 · 4 comments · Fixed by #2103
Closed

Does BigQuery template query take advantage of Partitions? #2083

judahrand opened this issue Nov 22, 2021 · 4 comments · Fixed by #2103
Assignees
Labels
keep-open kind/feature New feature or request

Comments

@judahrand
Copy link
Member

judahrand commented Nov 22, 2021

I'm unclear whether due to the dynamic nature of these WHERE clauses this query will take advantage of table partitions on the event timestamp?

This could be solved by predetermining these min and max values and templating them in directly.

https://cloud.google.com/bigquery/docs/querying-partitioned-tables#pruning_limiting_partitions

WHERE {{ featureview.event_timestamp_column }} <= (SELECT MAX(entity_timestamp) FROM entity_dataframe)
{% if featureview.ttl == 0 %}{% else %}
AND {{ featureview.event_timestamp_column }} >= Timestamp_sub((SELECT MIN(entity_timestamp) FROM entity_dataframe), interval {{ featureview.ttl }} second)

@judahrand judahrand added the kind/question Further information is requested label Nov 22, 2021
@adchia
Copy link
Collaborator

adchia commented Nov 25, 2021

@MattDelac was looking into taking advantage of partitioning more so my guess would be no?

@mavysavydav might be interested too as an fyi

@MattDelac
Copy link
Collaborator

@MattDelac was looking into taking advantage of partitioning more so my guess would be no?

I don't think Feast does a good job with leveraging Partitions everywhere. The problem might not just be here.
We should definitely have a whole RFC about "Handling partitions end-to-end workflow"

@judahrand judahrand added kind/feature New feature or request and removed kind/question Further information is requested labels Dec 1, 2021
@judahrand judahrand reopened this Dec 21, 2021
@stale
Copy link

stale bot commented Apr 21, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Apr 21, 2022
@adchia adchia added keep-open and removed wontfix This will not be worked on labels Apr 21, 2022
@adchia
Copy link
Collaborator

adchia commented Apr 21, 2022

Closing this to funnel more discussions in #2530

@adchia adchia closed this as completed Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keep-open kind/feature New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants