File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
sdk/python/feast/infra/offline_stores/contrib/trino_offline_store Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 99import pandas as pd
1010import pyarrow as pa
1111import trino
12+ import trino .auth
1213from trino .dbapi import Cursor
1314from trino .exceptions import TrinoQueryError
1415
@@ -37,7 +38,7 @@ def __init__(
3738 http_scheme : str ,
3839 verify : bool ,
3940 extra_credential : Optional [str ],
40- auth : Optional [trino .Authentication ],
41+ auth : Optional [trino .auth . Authentication ],
4142 ):
4243 self .host = host
4344 self .port = port
@@ -106,7 +107,9 @@ def execute(self) -> Results:
106107 self .execution_time = end_time - start_time
107108 self .status = QueryStatus .COMPLETED
108109
109- return Results (data = rows , columns = self ._cursor ._query .columns )
110+ query = self ._cursor ._query
111+ assert query is not None , "Cursor query should not be None after execute"
112+ return Results (data = rows , columns = query .columns )
110113 except TrinoQueryError as error :
111114 self .status = QueryStatus .ERROR
112115 raise error
You can’t perform that action at this time.
0 commit comments