Skip to content

Commit 648c53d

Browse files
authored
fix: Fix Trino offline store SQL in Jinja template (#5346)
fix: wrap table_subquery in subquery alias for Trino syntax compatibility Signed-off-by: kkochanovskiy <[email protected]>
1 parent bfdbf60 commit 648c53d

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎README.md‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
[![PyPI - Downloads](https://img.shields.io/pypi/dm/feast)](https://pypi.org/project/feast/)
1111
[![GitHub contributors](https://img.shields.io/github/contributors/feast-dev/feast)](https://github.com/feast-dev/feast/graphs/contributors)
12-
[![unit-tests](https://github.com/feast-dev/feast/actions/workflows/unit_tests.yml/badge.svg?branch=master&event=pull_request)](https://github.com/feast-dev/feast/actions/workflows/unit_tests.yml)
12+
[![unit-tests](https://github.com/feast-dev/feast/actions/workflows/unit_tests.yml/badge.svg?branch=master)](https://github.com/feast-dev/feast/actions/workflows/unit_tests.yml)
1313
[![integration-tests-and-build](https://github.com/feast-dev/feast/actions/workflows/master_only.yml/badge.svg?branch=master&event=push)](https://github.com/feast-dev/feast/actions/workflows/master_only.yml)
1414
[![java-integration-tests](https://github.com/feast-dev/feast/actions/workflows/java_master_only.yml/badge.svg?branch=master&event=push)](https://github.com/feast-dev/feast/actions/workflows/java_master_only.yml)
1515
[![linter](https://github.com/feast-dev/feast/actions/workflows/linter.yml/badge.svg?branch=master&event=push)](https://github.com/feast-dev/feast/actions/workflows/linter.yml)
@@ -21,8 +21,6 @@
2121
## Join us on Slack!
2222
👋👋👋 [Come say hi on Slack!](https://communityinviter.com/apps/feastopensource/feast-the-open-source-feature-store)
2323

24-
[Check out our DeepWiki!](https://deepwiki.com/feast-dev/feast)
25-
2624
## Overview
2725

2826
Feast (**Fea**ture **St**ore) is an open source feature store for machine learning. Feast is the fastest path to manage existing infrastructure to productionize analytic data for model training and online inference.
@@ -259,4 +257,4 @@ Thanks goes to these incredible people:
259257

260258
<a href="https://github.com/feast-dev/feast/graphs/contributors">
261259
<img src="https://contrib.rocks/image?repo=feast-dev/feast" />
262-
</a>
260+
</a>

‎sdk/python/feast/infra/offline_stores/contrib/trino_offline_store/trino.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,9 @@ def _get_entity_df_event_timestamp_range(
590590
{% for feature in featureview.features %}
591591
{{ feature }} as {% if full_feature_names %}{{ featureview.name }}__{{featureview.field_mapping.get(feature, feature)}}{% else %}{{ featureview.field_mapping.get(feature, feature) }}{% endif %}{% if loop.last %}{% else %}, {% endif %}
592592
{% endfor %}
593-
FROM {{ featureview.table_subquery }}
593+
FROM (
594+
{{ featureview.table_subquery }}
595+
) AS {{ featureview.name }}__subquery
594596
WHERE {{ featureview.timestamp_field }} <= from_iso8601_timestamp('{{ featureview.max_event_timestamp }}')
595597
{% if featureview.ttl == 0 %}{% else %}
596598
AND {{ featureview.timestamp_field }} >= from_iso8601_timestamp('{{ featureview.min_event_timestamp }}')

0 commit comments

Comments
 (0)