private TemporalAmount readIntervalValue(ClickHouseDataType dataType, InputStream input) throws IOException {
        BigInteger v = readBigIntegerLE(8, true);

        switch (dataType) {
            case IntervalYear:
                return Period.ofYears(v.intValue());
            case IntervalQuarter:
                return Period.ofMonths(3 * v.intValue());
            case IntervalMonth:
                return Period.ofMonths(v.intValue());
            case IntervalWeek:
                return Period.ofWeeks(v.intValue());
            case IntervalDay:
                return Period.ofDays(v.intValue());
            case IntervalHour:
                return Duration.ofHours(v.longValue());
            case IntervalMinute:
                return Duration.ofMinutes(v.longValue());
            case IntervalSecond:
                return Duration.ofSeconds(v.longValue());
            case IntervalMicrosecond:
                return Duration.ofNanos(v.longValue() * 1000);
            case IntervalMillisecond:
                return Duration.ofMillis(v.longValue());
            case IntervalNanosecond:
                return Duration.ofNanos(v.longValue());
            default:
                throw new ClientException("Unsupported interval type: " + dataType);
        }
    }
Reads a value from the internal input stream. Method will use type hint to do smarter conversion if possible.
For example, all datetime values are of {@link ZonedDateTime}; if a type hint is {@link LocalDateTime} then
{@link ZonedDateTime#toLocalDateTime()} .
@param column - column information
@param typeHint - type hint
@return value
@param <T> - target type of the value
@throws IOException when IO error occurs
client-v2/src/main/java/com/clickhouse/client/api/data_formats/internal/BinaryStreamReader.java