[Python] Conversion of datetime.datetime to date32 type silently truncates
Open
Component: Python
Type: bug
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 4.3k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 88
Description
### Describe the bug, including details regarding any error messages, version, and platform.
Issue in title - behavior looks like it just truncates the time component of the datetime:
```python
>>> import pyarrow as pa
>>> import datetime
>>> pa.scalar(datetime.datetime(2024, 1, 1, 1, 1, 1), pa.date32())
```
The silent truncation seems problematic though - should this just raise and force users to opt for `datetime.date` instead?
cc @PedroVerardo who helped find this downstream in pandas
### Component(s)
Python
Contributor guide
Assessment
This issue has not been assessed yet.