From 6610a75b0f28e5274d23eb525d3e38433919661d Mon Sep 17 00:00:00 2001 From: ebolblga Date: Tue, 27 May 2025 20:40:19 +0300 Subject: [PATCH 1/3] fix: remove forced schema when converting pandas to pyarrow table Signed-off-by: ebolblga --- .../infra/offline_stores/contrib/trino_offline_store/trino.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/python/feast/infra/offline_stores/contrib/trino_offline_store/trino.py b/sdk/python/feast/infra/offline_stores/contrib/trino_offline_store/trino.py index d397e7674e4..30cdebc51ea 100644 --- a/sdk/python/feast/infra/offline_stores/contrib/trino_offline_store/trino.py +++ b/sdk/python/feast/infra/offline_stores/contrib/trino_offline_store/trino.py @@ -208,7 +208,7 @@ def _to_df_internal(self, timeout: Optional[int] = None) -> pd.DataFrame: def _to_arrow_internal(self, timeout: Optional[int] = None) -> pyarrow.Table: """Return payrrow dataset as synchronously including on demand transforms""" return pyarrow.Table.from_pandas( - self._to_df_internal(timeout=timeout), schema=self.pyarrow_schema + self._to_df_internal(timeout=timeout) ) def to_sql(self) -> str: From dd118d6a506f06ec5abbac0cdedb83fa7e19d3e8 Mon Sep 17 00:00:00 2001 From: ebolblga Date: Tue, 27 May 2025 20:47:35 +0300 Subject: [PATCH 2/3] fix: add arrays to trino supported types in docs Signed-off-by: ebolblga --- docs/reference/data-sources/overview.md | 2 +- docs/reference/data-sources/trino.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/reference/data-sources/overview.md b/docs/reference/data-sources/overview.md index 9880d388dde..7cffc4154dd 100644 --- a/docs/reference/data-sources/overview.md +++ b/docs/reference/data-sources/overview.md @@ -28,4 +28,4 @@ Below is a matrix indicating which data sources support which types. | `float64` | yes | yes | yes | yes | yes | yes | yes | yes | | `bool` | yes | yes | yes | yes | yes | yes | yes | yes | | `timestamp` | yes | yes | yes | yes | yes | yes | yes | yes | -| array types | yes | yes | yes | no | yes | yes | no | no | +| array types | yes | yes | yes | no | yes | yes | yes | no | diff --git a/docs/reference/data-sources/trino.md b/docs/reference/data-sources/trino.md index c74981f47e0..74c8c3cc956 100644 --- a/docs/reference/data-sources/trino.md +++ b/docs/reference/data-sources/trino.md @@ -8,7 +8,7 @@ These can be specified either by a table reference or a SQL query. ## Disclaimer The Trino data source does not achieve full test coverage. -Please do not assume complete stability. +Please do not assume complete stability. ## Examples @@ -30,5 +30,5 @@ The full set of configuration options is available [here](https://rtd.feast.dev/ ## Supported Types -Trino data sources support all eight primitive types, but currently do not support array types. +Trino data sources support all eight primitive types and their corresponding array types. For a comparison against other batch data sources, please see [here](overview.md#functionality-matrix). From cd1f210da69a8479a51fb9341f16c03f9195a376 Mon Sep 17 00:00:00 2001 From: ebolblga Date: Tue, 27 May 2025 21:27:03 +0300 Subject: [PATCH 3/3] chore: linting Signed-off-by: ebolblga --- .../infra/offline_stores/contrib/trino_offline_store/trino.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sdk/python/feast/infra/offline_stores/contrib/trino_offline_store/trino.py b/sdk/python/feast/infra/offline_stores/contrib/trino_offline_store/trino.py index 30cdebc51ea..fd126e87db6 100644 --- a/sdk/python/feast/infra/offline_stores/contrib/trino_offline_store/trino.py +++ b/sdk/python/feast/infra/offline_stores/contrib/trino_offline_store/trino.py @@ -207,9 +207,7 @@ def _to_df_internal(self, timeout: Optional[int] = None) -> pd.DataFrame: def _to_arrow_internal(self, timeout: Optional[int] = None) -> pyarrow.Table: """Return payrrow dataset as synchronously including on demand transforms""" - return pyarrow.Table.from_pandas( - self._to_df_internal(timeout=timeout) - ) + return pyarrow.Table.from_pandas(self._to_df_internal(timeout=timeout)) def to_sql(self) -> str: """Returns the SQL query that will be executed in Trino to build the historical feature table"""