@mock.patch('airflow.providers.google.cloud.hooks.bigquery.BigQueryHook.get_service')
def test_run_query_sql_dialect_legacy_with_query_params_fails(self, _):
    params = [{'name': 'param_name', 'parameterType': {'type': 'STRING'}, 'parameterValue': {'value': 'param_value'}}]
    with pytest.raises(ValueError, match='Query parameters are not allowed when using legacy SQL'):
        self.hook.run_query('query', use_legacy_sql=True, query_params=params)
@mock.patch('airflow.providers.google.cloud.hooks.bigquery.BigQueryHook.get_service')
def test_run_query_sql_dialect_legacy_with_query_params_fails(self, _):
    params = [{'name': 'param_name', 'parameterType': {'type': 'STRING'}, 'parameterValue': {'value': 'param_value'}}]
    with pytest.raises(ValueError, match='Query parameters are not allowed when using legacy SQL'):
        self.hook.run_query('query', use_legacy_sql=True, query_params=params)