code: @Override
    public DateTime toDate(String filePath, Formatter formatter)
    {
      Integer[] vals = getDateValues(filePath, formatter);
      GranularityType granularityType = GranularityType.fromPeriod(period);
  
      DateTime date = granularityType.getDateTime(vals);
  
      if (date != null) {
        return bucketStart(date);
      }
  
      return null;
    }
docs: Used only for Segments. Not for Queries