-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Replace tz implementation from date with LLVM implementation #12422
Conversation
✅ Deploy Preview for meta-velox canceled.
|
This pull request was exported from Phabricator. Differential Revision: D69997637 |
This pull request was exported from Phabricator. Differential Revision: D69997637 |
146e0d3
to
70babae
Compare
…acebookincubator#12422) Summary: Pull Request resolved: facebookincubator#12422 TODO Differential Revision: D69997637
This pull request was exported from Phabricator. Differential Revision: D69997637 |
…acebookincubator#12422) Summary: Pull Request resolved: facebookincubator#12422 TODO Differential Revision: D69997637
70babae
to
32485f0
Compare
This pull request was exported from Phabricator. Differential Revision: D69997637 |
…acebookincubator#12422) Summary: Pull Request resolved: facebookincubator#12422 TODO Differential Revision: D69997637
32485f0
to
dd60d31
Compare
This pull request was exported from Phabricator. Differential Revision: D69997637 |
…acebookincubator#12422) Summary: Pull Request resolved: facebookincubator#12422 TODO Differential Revision: D69997637
dd60d31
to
4c3d587
Compare
This pull request was exported from Phabricator. Differential Revision: D69997637 |
4c3d587
to
b2a253e
Compare
…acebookincubator#12422) Summary: Pull Request resolved: facebookincubator#12422 TODO Differential Revision: D69997637
This pull request was exported from Phabricator. Differential Revision: D69997637 |
…acebookincubator#12422) Summary: Pull Request resolved: facebookincubator#12422 TODO Differential Revision: D69997637
b2a253e
to
df47fe6
Compare
This pull request was exported from Phabricator. Differential Revision: D69997637 |
df47fe6
to
621cd13
Compare
…acebookincubator#12422) Summary: Pull Request resolved: facebookincubator#12422 TODO Differential Revision: D69997637
This pull request was exported from Phabricator. Differential Revision: D69997637 |
…/4] (facebookincubator#12422) Summary: Pull Request resolved: facebookincubator#12422 TODO Differential Revision: D69997637
621cd13
to
07c5b89
Compare
This pull request was exported from Phabricator. Differential Revision: D69997637 |
…/4] (facebookincubator#12422) Summary: Pull Request resolved: facebookincubator#12422 TODO Differential Revision: D69997637
07c5b89
to
8876d90
Compare
This pull request was exported from Phabricator. Differential Revision: D69997637 |
8876d90
to
20ca0d5
Compare
…/4] (facebookincubator#12422) Summary: Pull Request resolved: facebookincubator#12422 TODO Differential Revision: D69997637
This pull request was exported from Phabricator. Differential Revision: D69997637 |
20ca0d5
to
b6a866f
Compare
…/4] (facebookincubator#12422) Summary: Pull Request resolved: facebookincubator#12422 We currently use (slightly modified versions of) the tz.h/tz.cpp (along with ios.h/tz_private.h) files from https://github.com/HowardHinnant/date to handle time zone conversions. A version of this API was voted into the C++20 standard. Since then further support/development of the library has been limited. In particular it has a known limitation when daylight savings time rules used to determine transition dates/times into the distant future are not supported in the library. This means Velox only supports datetimes in time zones with DST up to the year 2037. LLVM has an implementation of the new C++20 standard that is heavily based on that in the date repo. It is not finished yet, and still considered "experimental" but it already provides some notable improvements, e.g. support of DST into the distant future. In order to take advantage of this and prepare us to adopt the C++20 library once it's available, I've replace the tz.h/tz.cpp files with the set of files from LLVM that implement the API in std::chrono in C++20. This first PR simply pulls in the files from LLVM, removes some libcpp specific macros, replaces C++20-isms with C++17 equivalents, and updates namespaces and includes. The only meaningful code change in these files is I ported the logic to find the necessary zoneinfo files/directories on Mac from the date library as LLVM only supports finding them in Linux systems. Beyond that I updated includes/namspaces in the rest of the velox codebase to use the new files. I commented out/modified some code (mostly tests) that are broken by the change, in case I include a comment indicating the follow up PR that addresses the issue and restores the code. I will land these as a single stack, I did this to simplify the review process and ensure each PR individually builds and passes tests. Note that we still use the date.h and ios_week.h files from https://github.com/HowardHinnant/date for two reasons: 1) These were not fully adopted by the C++20 standard and we use some of the types that did not make it into the standard. 2) There's some discussion of supporting a range of years beyond what std::year supports to match Presto Java's behavior, which will require forking these anyway. Differential Revision: D69997637
This pull request was exported from Phabricator. Differential Revision: D69997637 |
b6a866f
to
c2bd099
Compare
…/4] (facebookincubator#12422) Summary: Pull Request resolved: facebookincubator#12422 We currently use (slightly modified versions of) the tz.h/tz.cpp (along with ios.h/tz_private.h) files from https://github.com/HowardHinnant/date to handle time zone conversions. A version of this API was voted into the C++20 standard. Since then further support/development of the library has been limited. In particular it has a known limitation when daylight savings time rules used to determine transition dates/times into the distant future are not supported in the library. This means Velox only supports datetimes in time zones with DST up to the year 2037. LLVM has an implementation of the new C++20 standard that is heavily based on that in the date repo. It is not finished yet, and still considered "experimental" but it already provides some notable improvements, e.g. support of DST into the distant future. In order to take advantage of this and prepare us to adopt the C++20 library once it's available, I've replace the tz.h/tz.cpp files with the set of files from LLVM that implement the API in std::chrono in C++20. This first PR simply pulls in the files from LLVM, removes some libcpp specific macros, replaces C++20-isms with C++17 equivalents, and updates namespaces and includes. The only meaningful code change in these files is I ported the logic to find the necessary zoneinfo files/directories on Mac from the date library as LLVM only supports finding them in Linux systems. Beyond that I updated includes/namspaces in the rest of the velox codebase to use the new files. I commented out/modified some code (mostly tests) that are broken by the change, in case I include a comment indicating the follow up PR that addresses the issue and restores the code. I will land these as a single stack, I did this to simplify the review process and ensure each PR individually builds and passes tests. Note that we still use the date.h and ios_week.h files from https://github.com/HowardHinnant/date for two reasons: 1) These were not fully adopted by the C++20 standard and we use some of the types that did not make it into the standard. 2) There's some discussion of supporting a range of years beyond what std::year supports to match Presto Java's behavior, which will require forking these anyway. Differential Revision: D69997637
This pull request was exported from Phabricator. Differential Revision: D69997637 |
…/4] (facebookincubator#12422) Summary: Pull Request resolved: facebookincubator#12422 We currently use (slightly modified versions of) the tz.h/tz.cpp (along with ios.h/tz_private.h) files from https://github.com/HowardHinnant/date to handle time zone conversions. A version of this API was voted into the C++20 standard. Since then further support/development of the library has been limited. In particular it has a known limitation when daylight savings time rules used to determine transition dates/times into the distant future are not supported in the library. This means Velox only supports datetimes in time zones with DST up to the year 2037. LLVM has an implementation of the new C++20 standard that is heavily based on that in the date repo. It is not finished yet, and still considered "experimental" but it already provides some notable improvements, e.g. support of DST into the distant future. In order to take advantage of this and prepare us to adopt the C++20 library once it's available, I've replace the tz.h/tz.cpp files with the set of files from LLVM that implement the API in std::chrono in C++20. This first PR simply pulls in the files from LLVM, removes some libcpp specific macros, replaces C++20-isms with C++17 equivalents, and updates namespaces and includes. The only meaningful code change in these files is I ported the logic to find the necessary zoneinfo files/directories on Mac from the date library as LLVM only supports finding them in Linux systems. Beyond that I updated includes/namspaces in the rest of the velox codebase to use the new files. I commented out/modified some code (mostly tests) that are broken by the change, in case I include a comment indicating the follow up PR that addresses the issue and restores the code. I will land these as a single stack, I did this to simplify the review process and ensure each PR individually builds and passes tests. Note that we still use the date.h and ios_week.h files from https://github.com/HowardHinnant/date for two reasons: 1) These were not fully adopted by the C++20 standard and we use some of the types that did not make it into the standard. 2) There's some discussion of supporting a range of years beyond what std::year supports to match Presto Java's behavior, which will require forking these anyway. Differential Revision: D69997637
c2bd099
to
f94f9ab
Compare
…/4] (facebookincubator#12422) Summary: Pull Request resolved: facebookincubator#12422 We currently use (slightly modified versions of) the tz.h/tz.cpp (along with ios.h/tz_private.h) files from https://github.com/HowardHinnant/date to handle time zone conversions. A version of this API was voted into the C++20 standard. Since then further support/development of the library has been limited. In particular it has a known limitation when daylight savings time rules used to determine transition dates/times into the distant future are not supported in the library. This means Velox only supports datetimes in time zones with DST up to the year 2037. LLVM has an implementation of the new C++20 standard that is heavily based on that in the date repo. It is not finished yet, and still considered "experimental" but it already provides some notable improvements, e.g. support of DST into the distant future. In order to take advantage of this and prepare us to adopt the C++20 library once it's available, I've replace the tz.h/tz.cpp files with the set of files from LLVM that implement the API in std::chrono in C++20. This first PR simply pulls in the files from LLVM, removes some libcpp specific macros, replaces C++20-isms with C++17 equivalents, and updates namespaces and includes. The only meaningful code change in these files is I ported the logic to find the necessary zoneinfo files/directories on Mac from the date library as LLVM only supports finding them in Linux systems. Beyond that I updated includes/namspaces in the rest of the velox codebase to use the new files. I commented out/modified some code (mostly tests) that are broken by the change, in case I include a comment indicating the follow up PR that addresses the issue and restores the code. I will land these as a single stack, I did this to simplify the review process and ensure each PR individually builds and passes tests. Note that we still use the date.h and ios_week.h files from https://github.com/HowardHinnant/date for two reasons: 1) These were not fully adopted by the C++20 standard and we use some of the types that did not make it into the standard. 2) There's some discussion of supporting a range of years beyond what std::year supports to match Presto Java's behavior, which will require forking these anyway. Reviewed By: kgpai, yuandagits Differential Revision: D69997637
This pull request was exported from Phabricator. Differential Revision: D69997637 |
f94f9ab
to
7940436
Compare
This pull request has been merged in 16e4460. |
Summary:
We currently use (slightly modified versions of) the tz.h/tz.cpp (along with ios.h/tz_private.h) files
from https://github.com/HowardHinnant/date to handle time zone conversions. A version of this
API was voted into the C++20 standard. Since then further support/development of the library has
been limited.
In particular it has a known limitation when daylight savings time rules used to determine transition
dates/times into the distant future are not supported in the library. This means Velox only supports
datetimes in time zones with DST up to the year 2037.
LLVM has an implementation of the new C++20 standard that is heavily based on that in the date
repo. It is not finished yet, and still considered "experimental" but it already provides some notable
improvements, e.g. support of DST into the distant future.
In order to take advantage of this and prepare us to adopt the C++20 library once it's available,
I've replace the tz.h/tz.cpp files with the set of files from LLVM that implement the API in
std::chrono in C++20.
This first PR simply pulls in the files from LLVM, removes some libcpp specific macros, replaces C++20-isms with C++17 equivalents, and updates namespaces and includes. The only meaningful code change in these files is I ported the logic to find the necessary zoneinfo files/directories on Mac from the date library as LLVM only supports finding them in Linux systems.
Beyond that I updated includes/namspaces in the rest of the velox codebase to use the new files. I commented out/modified some code (mostly tests) that are broken by the change, in case I include a comment indicating the follow up PR that addresses the issue and restores the code. I will land these as a single stack, I did this to simplify the review process and ensure each PR individually builds and passes tests.
Note that we still use the date.h and ios_week.h files from https://github.com/HowardHinnant/date
for two reasons:
make it into the standard.
match Presto Java's behavior, which will require forking these anyway.
Differential Revision: D69997637