cecemei commented on code in PR #18403: URL: https://github.com/apache/druid/pull/18403#discussion_r2331391992
########## processing/src/main/java/org/apache/druid/java/util/common/granularity/PeriodGranularity.java: ########## @@ -216,6 +226,139 @@ public String toString() '}'; } + /** + * Returns true if this granularity can be mapped to the target granularity. For example: + * <li>Period('PT1H') in UTC can be mapped to Period('P1D') in UTC</li> + * <li>Period('PT1H') in America/Los_Angeles can be mapped to Period('PT1H') in UTC</li> + * <li>Period('P1D') in America/Los_Angeles cannot be mapped to Period('P1D') in UTC</li> + */ + public boolean canBeMappedTo(PeriodGranularity target) Review Comment: added some additional comments. also added `PERIOD_GRAN_CACHE` in `Projections.java`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org For additional commands, e-mail: commits-h...@druid.apache.org