Skip to content

Commit 9ba9ded

Browse files
authored
fix: Fix NumPy - PyArrow array type mapping in Trino offline store (feast-dev#5393)
1 parent 6765515 commit 9ba9ded

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

docs/reference/data-sources/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ Below is a matrix indicating which data sources support which types.
2828
| `float64` | yes | yes | yes | yes | yes | yes | yes | yes |
2929
| `bool` | yes | yes | yes | yes | yes | yes | yes | yes |
3030
| `timestamp` | yes | yes | yes | yes | yes | yes | yes | yes |
31-
| array types | yes | yes | yes | no | yes | yes | no | no |
31+
| array types | yes | yes | yes | no | yes | yes | yes | no |

docs/reference/data-sources/trino.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ These can be specified either by a table reference or a SQL query.
88
## Disclaimer
99

1010
The Trino data source does not achieve full test coverage.
11-
Please do not assume complete stability.
11+
Please do not assume complete stability.
1212

1313
## Examples
1414

@@ -30,5 +30,5 @@ The full set of configuration options is available [here](https://rtd.feast.dev/
3030

3131
## Supported Types
3232

33-
Trino data sources support all eight primitive types, but currently do not support array types.
33+
Trino data sources support all eight primitive types and their corresponding array types.
3434
For a comparison against other batch data sources, please see [here](overview.md#functionality-matrix).

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,7 @@ def _to_df_internal(self, timeout: Optional[int] = None) -> pd.DataFrame:
207207

208208
def _to_arrow_internal(self, timeout: Optional[int] = None) -> pyarrow.Table:
209209
"""Return payrrow dataset as synchronously including on demand transforms"""
210-
return pyarrow.Table.from_pandas(
211-
self._to_df_internal(timeout=timeout), schema=self.pyarrow_schema
212-
)
210+
return pyarrow.Table.from_pandas(self._to_df_internal(timeout=timeout))
213211

214212
def to_sql(self) -> str:
215213
"""Returns the SQL query that will be executed in Trino to build the historical feature table"""

0 commit comments

Comments
 (0)