Commit 7484a07
Filter out timezones not supported by Python (NVIDIA#13289)
Fixes NVIDIA#13285
### Description
The root cause is the inconsistent between Python and JVM: JVM supports
'America/Coyhaique' but Python gets None in the code
`tz.gettz(time_zone)`. And the `TimestampGen` will use
`TimestampNTZType` type which is not expected, then causes error:
`TypeError: can't subtract offset-naive and offset-aware datetimes`
### Fix
Filter out timezones not supported by Python
### Checklists
This PR has:
- [ ] added documentation for new or modified features or behaviors.
- [x] updated the license in the source code files when it is required.
- [x] added new tests or modified existing tests to cover new code
paths.
(Please explain in the PR description how the new code paths are tested,
such as names of the new/existing tests that cover them.)
Please select one of the following options:
- [ ] Performance testing has been performed and its results are added
in the PR description.
- [ ] An issue is filed for performance testing and its link is added in
the PR description. (Select this if performance testing will not be
completed before the PR is submitted.)
---------
Signed-off-by: Chong Gao <[email protected]>
Co-authored-by: Chong Gao <[email protected]>1 parent 462756f commit 7484a07
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | | - | |
25 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
0 commit comments