Using Trino 368, configured with a BigQuery connector there is a significant performance impact while querying using a nested field.
Reproducible example:
public github archive big query connection:
connector.name=bigquery
bigquery.project-id=githubarchive
bigquery.credentials-file=...
fast query:
SELECT * FROM bigquery."day"."20220112"
where id = '19687131707'
limit 1
very slow query:
SELECT * FROM bigquery."day"."20220112"
where repo.id = 447018807
limit 1
Relates to https://trinodb.slack.com/archives/CGB0QHWSW/p1642075559152000