[
https://issues.apache.org/jira/browse/ARROW-9768?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Antoine Pitrou reassigned ARROW-9768:
-------------------------------------
Assignee: Joris Van den Bossche
> [Python] Pyarrow allows for unsafe conversions of datetime objects to
> timestamp nanoseconds
> -------------------------------------------------------------------------------------------
>
> Key: ARROW-9768
> URL: https://issues.apache.org/jira/browse/ARROW-9768
> Project: Apache Arrow
> Issue Type: Bug
> Components: Python
> Affects Versions: 0.17.1, 1.0.0
> Environment: OS: MacOSX Catalina
> Python Version: 3.7
> Reporter: Joshua Lay
> Assignee: Joris Van den Bossche
> Priority: Minor
> Labels: pull-request-available
> Fix For: 2.0.0
>
> Time Spent: 2h 10m
> Remaining Estimate: 0h
>
> Hi,
> In parquet, I want to store date values as timestamp format with nanoseconds
> precision. This works fine with most dates except those past
> pandas.Timestamp.max:
> [https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Timestamp.max.html.|https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Timestamp.max.html]
> I was expecting some exception to be raised (like in Pandas), however this
> did not happen and the value was processed incorrectly. Note that this is
> with safe=True. Can this please be looked into? Thanks
> {{Example Code:}}
> {{pa.array([datetime(2262,4,12)], type=pa.timestamp("ns"))}}
> \{{}}
> {{Return:}}
> {{[}}
> \{{ 1677-09-21 00:25:26.290448384}}
> {{]}}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)