public void set(BigDecimal totalSecondsBd) {
    long totalSeconds = totalSecondsBd.longValue();
    BigDecimal fractionalSecs = totalSecondsBd.remainder(BigDecimal.ONE);
    int nanos = fractionalSecs.multiply(IntervalDayTimeUtils.NANOS_PER_SEC_BD).intValue();
    set(totalSeconds, nanos);
  }
Ensures that the seconds and nanoseconds fields have consistent sign
storage-api/src/java/org/apache/hadoop/hive/common/type/HiveIntervalDayTime.java