feat: Add America/Coyhaique timezone support#16362
Open
n0r0shi wants to merge 1 commit intofacebookincubator:mainfrom
Open
feat: Add America/Coyhaique timezone support#16362n0r0shi wants to merge 1 commit intofacebookincubator:mainfrom
n0r0shi wants to merge 1 commit intofacebookincubator:mainfrom
Conversation
✅ Deploy Preview for meta-velox canceled.
|
5dd591e to
2ae9467
Compare
Contributor
|
Hi @n0r0shi The Timezonedatabase file is autogenerated and based on what is supported by Presto. We can make this change after prestodb/presto#26981 lands in Presto. |
Contributor
Author
|
@kgpai Thanks for the context. I understand that prestodb/presto#26981 needs to be merged first since Velox pulls its timezone database from Presto. That's exactly why I've kept this PR as a draft. I'm happy to wait until the Presto change lands, and I'll rebase and mark it ready for review once it does. |
Add America/Coyhaique (timezone ID 2234) to the timezone database and timezone names, following the Presto zone-index convention. Also fix the namespace in gen_timezone_database.py (util -> tz) to match the current codebase. America/Coyhaique was added to the IANA timezone database in tzdata 2025b. The upstream Presto PR (prestodb/presto#26981) has been merged. Fixes facebookincubator#16216
2ae9467 to
c82e833
Compare
Contributor
Author
|
Updated this PR — it's no longer a draft since the upstream Presto PR (prestodb/presto#26981) has been merged. Changes since the original version:
Ready for review. @rui-mo @zhli1142015 @kgpai |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
America/Coyhaique(timezone ID 2234) toTimeZoneDatabase.cpp, following the Presto zone-index conventionTimeZoneNames.cpp(Coyhaique Standard Time,Coyhaique Daylight Time)gen_timezone_database.py(facebook::velox::util→facebook::velox::tz)America/Coyhaiquewas added to the IANA timezone database in tzdata 2025b (JDK 17+). Systems running newer tzdata include this zone, but Velox rejects it because it's not in the hardcoded timezone ID map, causing queries withsession_timezone = 'America/Coyhaique'to fail.The upstream Presto PR (prestodb/presto#26981) adding this zone to
zone-index.propertieshas been merged.How the files were generated
TimeZoneDatabase.cpp — generated from the Presto
zone-index.properties:./velox/type/tz/gen_timezone_database.py \ -f /path/to/zone-index.properties \ > velox/type/tz/TimeZoneDatabase.cppTimeZoneNames.cpp — short and long names obtained from Java's
DateFormatSymbols(openjdk 17):javac velox/type/tz/GenTimeZoneNames.java java velox.type.tz.GenTimeZoneNames > velox/type/tz/TimeZoneNames.cppThe entry was added manually to avoid a noisy full-file diff from formatting differences.
Related
Test plan
getTimeZoneName(2234)returns"America/Coyhaique"getTimeZoneID("America/Coyhaique")returns2234TimeZoneDatabase.cppmatches committed file exactly