Fokko commented on code in PR #43192:
URL: https://github.com/apache/arrow/pull/43192#discussion_r1671822344
##########
python/pyarrow/tests/test_compute.py:
##########
@@ -1842,6 +1842,26 @@ def test_cast():
assert pc.cast(arr, expected.type) == expected
+def test_identity_cast_dates():
+ dt = datetime.date(1990, 3, 1)
+ data = [[dt], [dt]]
+
+ schema = pa.schema([
+ ('date32', pa.date32()),
+ ('date64', pa.date64()),
+ ])
+
+ batch = pa.RecordBatch.from_arrays(data, schema=schema)
+
+ table = pa.RecordBatchReader.from_batches(
+ schema,
+ [batch]
+ ).cast(schema).read_all()
Review Comment:
Yes, certainly. I've been using this code since it was exactly the code that
caused issues on my end. I've updated the test 👍
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]