presto-raptor-legacy/src/main/java/io/prestosql/plugin/raptor/legacy/storage/organization/TemporalFunction.java/TemporalFunction/getDay
class TemporalFunction:    public int getDay(Type type, Block block, int position)
    {
        if (type.equals(DATE)) {
            return toIntExact(DATE.getLong(block, position));
        }

        if (type.equals(TIMESTAMP)) {
            long millis = TIMESTAMP.getLong(block, position);
            long local = timeZone.convertUTCToLocal(millis);
            long days = MILLISECONDS.toDays(local);
            return toIntExact(days);
        }

        throw new IllegalArgumentException("Wrong type for temporal column: " + type);
    }