Skip to content

Commit c2ea7e9

Browse files
fix: Timestamp formatting and lakehouse-type connector for trino_offline_store. (#5846)
Signed-off-by: Sergey Kryazhevskikh <soliverr@gmail.com> Co-authored-by: Francisco Javier Arceo <arceofrancisco@gmail.com>
1 parent 5482a0e commit c2ea7e9

File tree

2 files changed

+8
-2
lines changed
  • sdk/python/feast/infra/offline_stores/contrib/trino_offline_store

2 files changed

+8
-2
lines changed

sdk/python/feast/infra/offline_stores/contrib/trino_offline_store/connectors/upload.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
"oracle",
5757
"redshift",
5858
"memsql",
59+
"lakehouse",
5960
}
6061

6162
CREATE_SCHEMA_QUERY_TEMPLATE = """

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,11 +424,16 @@ def pull_all_from_table_or_query(
424424
)
425425

426426
timestamp_filter = get_timestamp_filter_sql(
427-
start_date, end_date, timestamp_field, quote_fields=False
427+
start_date,
428+
end_date,
429+
timestamp_field,
430+
quote_fields=False,
431+
cast_style="timestamp",
432+
date_time_separator=" ",
428433
)
429434
query = f"""
430435
SELECT {field_string}
431-
FROM {from_expression}
436+
FROM ( {from_expression} )
432437
WHERE {timestamp_filter}
433438
"""
434439
return TrinoRetrievalJob(

0 commit comments

Comments
 (0)