From 245bd035709406d34f21b38fa1c9ad4ba3745177 Mon Sep 17 00:00:00 2001 From: Ivan Krizanic Date: Wed, 20 Jul 2022 17:16:05 +0200 Subject: [PATCH 1/2] Add dummy alias to pull_all_from_table_or_query Signed-off-by: Ivan Krizanic --- .../offline_stores/contrib/postgres_offline_store/postgres.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/python/feast/infra/offline_stores/contrib/postgres_offline_store/postgres.py b/sdk/python/feast/infra/offline_stores/contrib/postgres_offline_store/postgres.py index 415a46dde7..28944df72e 100644 --- a/sdk/python/feast/infra/offline_stores/contrib/postgres_offline_store/postgres.py +++ b/sdk/python/feast/infra/offline_stores/contrib/postgres_offline_store/postgres.py @@ -214,7 +214,7 @@ def pull_all_from_table_or_query( query = f""" SELECT {field_string} - FROM {from_expression} + FROM {from_expression} AS paftoq_alias WHERE "{timestamp_field}" BETWEEN '{start_date}'::timestamptz AND '{end_date}'::timestamptz """ From b73d640459030d883adc5f2b044f9bbfa7c52044 Mon Sep 17 00:00:00 2001 From: Ivan Krizanic Date: Thu, 21 Jul 2022 01:03:48 +0200 Subject: [PATCH 2/2] Fix lint error Signed-off-by: Ivan Krizanic --- sdk/python/tests/unit/infra/test_key_encoding_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/python/tests/unit/infra/test_key_encoding_utils.py b/sdk/python/tests/unit/infra/test_key_encoding_utils.py index 449d6819a1..df691ea21e 100644 --- a/sdk/python/tests/unit/infra/test_key_encoding_utils.py +++ b/sdk/python/tests/unit/infra/test_key_encoding_utils.py @@ -9,14 +9,14 @@ def test_serialize_entity_key(): # Should be fine serialize_entity_key( EntityKeyProto( - join_keys=["user"], entity_values=[ValueProto(int64_val=int(2 ** 15))] + join_keys=["user"], entity_values=[ValueProto(int64_val=int(2**15))] ), entity_key_serialization_version=2, ) # True int64, but should also be fine. serialize_entity_key( EntityKeyProto( - join_keys=["user"], entity_values=[ValueProto(int64_val=int(2 ** 31))] + join_keys=["user"], entity_values=[ValueProto(int64_val=int(2**31))] ), entity_key_serialization_version=2, ) @@ -25,6 +25,6 @@ def test_serialize_entity_key(): with pytest.raises(BaseException): serialize_entity_key( EntityKeyProto( - join_keys=["user"], entity_values=[ValueProto(int64_val=int(2 ** 31))] + join_keys=["user"], entity_values=[ValueProto(int64_val=int(2**31))] ), )