Commit 098174c
authored
Fix for ns timestamp non utc (#3142)
Closes #3127
# Rationale for this change
`pa.timestamp("ns", tz="US/Pacific") converts to TimestampNanoType()`
(tz-naive) instead of raising `TypeError`. The `us` path correctly
rejects non-UTC timezones.
raises TypeError
`visit_pyarrow(pa.timestamp("us", tz="US/Pacific"),
_ConvertToIceberg())`
silently drops timezone
`visit_pyarrow(pa.timestamp("ns", tz="US/Pacific"),
_ConvertToIceberg(format_version=3))`
Fixes this by adding the correct elif clause
## Are these changes tested?
Yes - added a couple of tests in the pyarrow visitor
## Are there any user-facing changes?
It fixes the behavior that was a bug, so I think it would be.1 parent fcfaaf6 commit 098174c
2 files changed
+14
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1451 | 1451 | | |
1452 | 1452 | | |
1453 | 1453 | | |
1454 | | - | |
| 1454 | + | |
1455 | 1455 | | |
1456 | 1456 | | |
1457 | 1457 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
226 | 227 | | |
227 | 228 | | |
228 | 229 | | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
229 | 242 | | |
230 | 243 | | |
231 | 244 | | |
| |||
0 commit comments