trinodb / trino-gateway

https://trinodb.github.io/trino-gateway/
Apache License 2.0
122 stars 48 forks source link

Add option for custom v1/statement-like paths #326

Open willmostly opened 2 months ago

willmostly commented 2 months ago

Description

Add an option to configure additional custom paths that should be treated like /v1/statement. This is required to support some features of Starburst Trino.

Additional context and related issues

The trino gateway checks if a request path starts with /v1/statement to decide if it should use query processing logic.

Release notes

( ) This is not user-visible or is docs only, and no release notes are required. ( ) Release notes are required. Please propose a release note for me. ( x) Release notes are required, with the following suggested text: Add option for custom v1/statement-like paths

willmostly commented 2 months ago

The runtime changes introduced here are limited. However, QueryIdCachingProxyHandler units tests were expanded to cover instance methods, which required some significant refactoring. The functionality of RoutingManager and ProxyHandlerStats should not be changed, but interfaces were extracted so that testing versions of these classes could be introduced.

ebyhr commented 2 months ago

This is required to support some features of Starburst Trino.

Is it possible to test the feature with https://hub.docker.com/r/starburstdata/starburst-enterprise?

willmostly commented 1 month ago

This is required to support some features of Starburst Trino.

Is it possible to test the feature with https://hub.docker.com/r/starburstdata/starburst-enterprise?

It is not, the Insights IDE feature that exposes the non-standard statement endpoint requires a license

mosabua commented 1 month ago

This is required to support some features of Starburst Trino.

Is it possible to test the feature with https://hub.docker.com/r/starburstdata/starburst-enterprise?

It is not, the Insights IDE feature that exposes the non-standard statement endpoint requires a license

Also we dont want to start testing with various distributions - that is something the distributors should do in their own CI setup.

mosabua commented 1 month ago

Lets discuss in the dev sync tomorrow.. I think we should merge this after adding docs .. or get the airlift removal done first and refactor this after.

mosabua commented 1 day ago

Another one to rebase and then merge @willmostly ;-)