code: public static PeriodGranularity toQueryGranularity(final TimeUnitRange timeUnitRange, final DateTimeZone timeZone)
    {
      final Period period = PERIOD_MAP.get(timeUnitRange);
      if (period == null) {
        return null;
      }
  
      return new PeriodGranularity(period, null, timeZone);
    }
docs: Returns the Druid QueryGranularity corresponding to a Calcite TimeUnitRange, or null if there is none.
  
  @param timeUnitRange time unit
  @param timeZone      session time zone
  
  @return queryGranularity, or null