You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TrinoSource.get_table_query_string() omits parentheses around query, causing SQL syntax errors in Trino compute engine #7017
When a TrinoSource is configured with query=..., calling get_table_query_string() should return the query wrapped in parentheses (f"({self.query})") so it can be referenced directly as a derived table in SQL FROM clauses.
This matches the behavior of all other SQL sources in Feast (BigQuerySource, SnowflakeSource, AthenaSource, RedshiftSource).
Current Behavior
TrinoSource.get_table_query_string() returns raw self.query:
Hi @ntkathole - I'd like to work on this one. I reproduced it against current master: TrinoSource(name='t', query='SELECT a, b FROM my_table WHERE x > 1').get_table_query_string() returns the raw query without parentheses, so downstream SQL becomes SELECT * FROM SELECT a, b FROM my_table WHERE x > 1 ..., which is invalid. The fix is to wrap the query in parentheses in get_table_query_string() plus a unit test. Could you assign it to me?
Activity
Mrun25 commentedon Oct 15, 2026
Hi @ntkathole - I'd like to work on this one. I reproduced it against current master:
TrinoSource(name='t', query='SELECT a, b FROM my_table WHERE x > 1').get_table_query_string()returns the raw query without parentheses, so downstream SQL becomesSELECT * FROM SELECT a, b FROM my_table WHERE x > 1 ..., which is invalid. The fix is to wrap the query in parentheses inget_table_query_string()plus a unit test. Could you assign it to me?Marcus-Rosti commentedon Oct 16, 2026
@Mrun25 I already fixed this in #7018