trinodb / trino-gateway

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

Remove non-null restriction for QueryHistory #381

Closed oneonestar closed 3 weeks ago

oneonestar commented 3 weeks ago

Description

Both userName and source in QueryHistory are nullable.

userName (ie. X-Trino-User) is optional in request. If not supplied, the session user is automatically determined via user mapping by coordinator. Trino-gateway won't be able to know the user determined by user mapping.

source is optional in Trino: https://github.com/trinodb/trino/blob/edd5d5bec766e90053e7c28ff9c9dc254790fdb0/core/trino-spi/src/main/java/io/trino/spi/eventlistener/QueryContext.java#L45

Release notes

(x) This is not user-visible or is docs only, and no release notes are required.