presto-hive/src/main/java/io/prestosql/plugin/hive/IonSqlQueryBuilder.java/IonSqlQueryBuilder/valueToQuery
class IonSqlQueryBuilder:    private static String valueToQuery(Type type, Object value)
    {
        if (type.equals(BIGINT)) {
            return String.valueOf(((Number) value).longValue());
        }
        if (type.equals(INTEGER)) {
            return String.valueOf(((Number) value).intValue());
        }
        if (type.equals(SMALLINT)) {
            return String.valueOf(((Number) value).shortValue());
        }
        if (type.equals(TINYINT)) {
            return String.valueOf(((Number) value).byteValue());
        }
        if (type.equals(BOOLEAN)) {
            return String.valueOf(value);
        }
        if (type.equals(DATE)) {
            return "`" + FORMATTER.print(DAYS.toMillis((long) value)) + "`";
        }
        if (type.equals(VarcharType.VARCHAR)) {
            return "'" + ((Slice) value).toStringUtf8() + "'";
        }
        if (type instanceof DecimalType) {
            if (Decimals.isLongDecimal(type)) {
                return Decimals.toString((Slice) value, ((DecimalType) type).getScale());
            }
            return Decimals.toString((long) value, ((DecimalType) type).getScale());
        }
        return "'" + ((Slice) value).toStringUtf8() + "'";
    }