Package io.trino.json

Class CachingResolver

java.lang.Object
io.trino.json.CachingResolver

public class CachingResolver extends Object
A resolver providing coercions and binary operators used for JSON path evaluation, based on the operation type and the input types.

It is instantiated per-driver, and caches the resolved operators and coercions. Caching is applied to IrArithmeticBinary and IrComparisonPredicate path nodes. Its purpose is to avoid resolving operators and coercions on a per-row basis, assuming that the input types to the JSON path operations repeat across rows.

If an operator or a component coercion cannot be resolved for certain input types, it is cached as RESOLUTION_ERROR. It depends on the caller to handle this condition.