You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "timothy-e (via GitHub)" <gi...@apache.org> on 2026/05/29 20:57:24 UTC

[PR] Add more timezone IDs and add tests to validate timezone compatibility [pinot]

timothy-e opened a new pull request, #18636:
URL: https://github.com/apache/pinot/pull/18636

   ### Summary
   
   Appends 44 timezone entries to `pinot-common/src/main/resources/zone-index.properties`. The entries cover:
   
   - `America/Coyhaique`
   - `Etc/GMT`, `Etc/GMT+0` through `Etc/GMT+12`, `Etc/GMT-0` through `Etc/GMT-14`, `Etc/GMT0`
   - `Etc/Greenwich`, `Etc/UCT`, `Etc/UTC`, `Etc/Universal`, `Etc/Zulu`
   - `GMT`, `GMT+0`, `GMT-0`, `GMT0`, `Greenwich`
   - `UCT`, `Universal`, `Zulu`
   
   `EST`, `HST`, `MST`, `Factory`, and `US/Pacific-New` remain excluded, consistent with the existing comments in the file noting they are absent from `java.time` or removed from tzdata.
   
   Stripe's timezone allowlist includes these timezone IDs, but they were absent from `zone-index.properties`, meaning Pinot would reject them as unrecognized timezone identifiers when used in queries.
   
   ### Testing 
   The timezones in this file are supposed to be compatible with `java.util.Timezone`, `java.time.ZoneId`, and `jodatime`, but nothing actually ensured that. I could manually check, but it's nice to have real validation. 
   
   Adds a new `TimeZoneKeyTest` class that validates all timezones listed in `zone-index.properties` are recognized by three timezone libraries:
   - `java.util.TimeZone`
   - `java.time.ZoneId`
   - Joda-Time's `DateTimeZone`
   
   The tests collect all unsupported timezones before failing, so a single test run surfaces every incompatible entry rather than stopping at the first failure.
   
   Also includes basic sanity checks that the zone index file is non-empty and that the UTC key is present with key 0.
   
   (I'm not sure why `zone-index.properties` has timezones like `-13:52`, as they're not compatible with `java.util.TimeZone`. For now, I've just skipped them in the `java.util.Timezone` test`.)
   


-- 
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-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [PR] Add more timezone IDs and add tests to validate timezone compatibility [pinot]

Posted by "timothy-e (via GitHub)" <gi...@apache.org>.
timothy-e commented on PR #18636:
URL: https://github.com/apache/pinot/pull/18636#issuecomment-4594505297

   > This file is kept in sync with https://github.com/prestodb/presto/blob/master/presto-common/src/main/resources/com/facebook/presto/common/type/zone-index.properties. We don't want to add custom timezones into it. 
   
   We're seeing some errors because users are supplying valid timezones that aren't supported by Pinot, but they are supported by all the relevant libraries. It's hard to tell people "here's an arbitrary subset of timezones that we won't support, subject to change at each release." 
   
   Maybe the best solution is for me to try pushing this to Presto as well? 
   
   > Are these added timezones valid in joda?
   
   Yeah, I added a test `testAllTimeZonesSupportedByJodaTime` to verify it


-- 
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-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [PR] Add more timezone IDs and add tests to validate timezone compatibility [pinot]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #18636:
URL: https://github.com/apache/pinot/pull/18636#issuecomment-4580131835

   ## [Codecov](https://app.codecov.io/gh/apache/pinot/pull/18636?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 56.81%. Comparing base ([`4ecb1d4`](https://app.codecov.io/gh/apache/pinot/commit/4ecb1d4ad88c638083258a6d4b27f92981777c34?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`2a53108`](https://app.codecov.io/gh/apache/pinot/commit/2a53108c1c6a472df9f60d825df9c98636e27520?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 11 commits behind head on master.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #18636      +/-   ##
   ============================================
   + Coverage     56.79%   56.81%   +0.01%     
   + Complexity        7        1       -6     
   ============================================
     Files          2567     2571       +4     
     Lines        149143   149210      +67     
     Branches      24111    24109       -2     
   ============================================
   + Hits          84707    84771      +64     
   - Misses        57241    57269      +28     
   + Partials       7195     7170      -25     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/pinot/pull/18636/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [custom-integration1](https://app.codecov.io/gh/apache/pinot/pull/18636/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [integration](https://app.codecov.io/gh/apache/pinot/pull/18636/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [integration1](https://app.codecov.io/gh/apache/pinot/pull/18636/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [integration2](https://app.codecov.io/gh/apache/pinot/pull/18636/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [java-21](https://app.codecov.io/gh/apache/pinot/pull/18636/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.81% <ø> (+0.01%)` | :arrow_up: |
   | [temurin](https://app.codecov.io/gh/apache/pinot/pull/18636/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.81% <ø> (+0.01%)` | :arrow_up: |
   | [unittests](https://app.codecov.io/gh/apache/pinot/pull/18636/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.81% <ø> (+0.01%)` | :arrow_up: |
   | [unittests1](https://app.codecov.io/gh/apache/pinot/pull/18636/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.81% <ø> (+0.01%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/pinot/pull/18636?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [PR] Add more timezone IDs and add tests to validate timezone compatibility [pinot]

Posted by "timothy-e (via GitHub)" <gi...@apache.org>.
timothy-e commented on PR #18636:
URL: https://github.com/apache/pinot/pull/18636#issuecomment-4579813315

   @Jackie-Jiang I saw you added some timezones a few months ago - I've added some more, and some tests to ensure they're valid timezones. Can you TAL when you have a chance? 


-- 
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-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [PR] Add more timezone IDs and add tests to validate timezone compatibility [pinot]

Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang commented on PR #18636:
URL: https://github.com/apache/pinot/pull/18636#issuecomment-5182974744

   @timothy-e I feel a better way to handle time zone is to parse as joda time first, then fallback to presto. Do you want to give it a try?


-- 
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-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org