Package io.trino.json

Class PathEvaluationException

All Implemented Interfaces:
Serializable

public class PathEvaluationException extends TrinoException
See Also:
  • Constructor Details

    • PathEvaluationException

      public PathEvaluationException(String message)
    • PathEvaluationException

      public PathEvaluationException(Throwable cause)
  • Method Details

    • structuralError

      @FormatMethod public static TrinoException structuralError(String format, Object... arguments)
      An exception resulting from a structural error during JSON path evaluation.

      A structural error occurs when the JSON path expression attempts to access a non-existent element of a JSON array or a non-existent member of a JSON object.

      Note: in `lax` mode, the structural errors are suppressed, and the erroneous subexpression is evaluated to an empty sequence. In `strict` mode, the structural errors are propagated to the enclosing function (i.e. the function within which the path is evaluated, e.g. `JSON_EXISTS`), and there they are handled accordingly to the chosen `ON ERROR` option. Non-structural errors (e.g. numeric exceptions) are not suppressed in `lax` or `strict` mode.

    • itemTypeError

      public static TrinoException itemTypeError(String expected, String actual)