@Override
    protected HiveIntervalDayTime getIntervalDayTime(String arg) {
      BigDecimal bd = new BigDecimal(arg);
      BigDecimal bdSeconds = new BigDecimal(bd.toBigInteger());
      BigDecimal bdNanos = bd.subtract(bdSeconds);
      return new HiveIntervalDayTime(0, 0, 0, bdSeconds.intValueExact(),
          bdNanos.multiply(NANOS_PER_SEC_BD).intValue());
    }
GenericUDF Class for support of "INTERVAL (expression) (DAY|YEAR|...)".
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFInternalInterval.java