presto-main/src/main/java/io/prestosql/util/JsonUtil.java/ObjectKeyProvider/createObjectKeyProvider
class ObjectKeyProvider:        static ObjectKeyProvider createObjectKeyProvider(Type type)
        {
            if (type instanceof UnknownType) {
                return (block, position) -> null;
            }
            if (type instanceof BooleanType) {
                return (block, position) -> type.getBoolean(block, position) ? "true" : "false";
            }
            if (type instanceof TinyintType || type instanceof SmallintType || type instanceof IntegerType || type instanceof BigintType) {
                return (block, position) -> String.valueOf(type.getLong(block, position));
            }
            if (type instanceof RealType) {
                return (block, position) -> String.valueOf(intBitsToFloat((int) type.getLong(block, position)));
            }
            if (type instanceof DoubleType) {
                return (block, position) -> String.valueOf(type.getDouble(block, position));
            }
            if (type instanceof DecimalType) {
                DecimalType decimalType = (DecimalType) type;
                if (isShortDecimal(decimalType)) {
                    return (block, position) -> Decimals.toString(decimalType.getLong(block, position), decimalType.getScale());
                }
                return (block, position) -> Decimals.toString(
                        decodeUnscaledValue(type.getSlice(block, position)),
                        decimalType.getScale());
            }
            if (type instanceof VarcharType) {
                return (block, position) -> type.getSlice(block, position).toStringUtf8();
            }

            throw new PrestoException(INVALID_FUNCTION_ARGUMENT, format("Unsupported type: %s", type));
        }