Connector Functions

Trino has an excellent library for scalar and aggregate functions. The API Securityconnector adds a few more.

container_version

This scalar function returns the version of the coordinator container.

Example:

select container_version()

histosum

This aggregate function returns a distribution values for a given column, with values summed across a second column. This is similar to the histogram function, except that histogram counts by one.

histogram(x) = histosum(x,1)

Example:

select risk_category, histosum(risk_category, cast(risk_score as varchar)) as count

from resurface.data.messages_index

group by risk_category