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 ) ; }
Returns the Druid QueryGranularity corresponding to a Calcite TimeUnitRange or null if there is none .