davlee1972 opened a new issue, #41884: URL: https://github.com/apache/arrow/issues/41884
### Describe the bug, including details regarding any error messages, version, and platform. RecordBatchReader.cast() was added in pyarrow 16.. Error: pyarrow.lib.ArrowTypeError: Field 0 cannot be cast from date32[day] to date32[day] ``` >>> import pyarrow as pa >>> import datetime >>> >>> t = pa.Table.from_pylist([{"abc": datetime.date.today()}]) >>> tb = t.to_reader() >>> tb.cast(t.schema) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "pyarrow\\ipc.pxi", line 800, in pyarrow.lib.RecordBatchReader.cast File "pyarrow\\error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow\\error.pxi", line 91, in pyarrow.lib.check_status pyarrow.lib.ArrowTypeError: Field 0 cannot be cast from date32[day] to date32[day] ``` In my use case: I'm trying to cast the results of a database query from: Field 0 is a string, Field 1 is a date32[day], Field 2 is a **double** to Field 0 is a string, Field 1 is a date32[day], Field 2 is a **float** But I'm getting Field 1 cast error on dates.. ### Component(s) Python -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@arrow.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org