presto-geospatial/src/main/java/io/prestosql/plugin/geospatial/KdbTreeCasts.java/KdbTreeCasts/castVarcharToKdbTree
class KdbTreeCasts:    @LiteralParameters("x")
    @ScalarOperator(CAST)
    @SqlType(KdbTreeType.NAME)
    public static Object castVarcharToKdbTree(@SqlType("varchar(x)") Slice json)
    {
        try {
            return KdbTreeUtils.fromJson(json.toStringUtf8());
        }
        catch (IllegalArgumentException e) {
            throw new PrestoException(INVALID_CAST_ARGUMENT, "Invalid JSON string for KDB tree", e);
        }
    }