kou commented on code in PR #43192:
URL: https://github.com/apache/arrow/pull/43192#discussion_r1671474339


##########
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:
   Why do we need to create a table here?
   Can we use `pc.cast()` or `Array.cast` like other tests do?



-- 
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]

Reply via email to