dangotbanned commented on code in PR #47609:
URL: https://github.com/apache/arrow/pull/47609#discussion_r2432798417


##########
python/pyarrow/tests/test_table.py:
##########
@@ -933,7 +947,10 @@ def test_table_from_struct_array_chunked_array():
         [[{"ints": 1}, {"floats": 1.0}]],
         type=pa.struct([("ints", pa.int32()), ("floats", pa.float32())]),
     )
-    result = pa.Table.from_struct_array(chunked_struct_array)
+    assert isinstance(chunked_struct_array.type, pa.StructType)
+    # Cast to the proper type for type checker
+    struct_chunked_array = cast(pa.ChunkedArray[pa.StructScalar], 
chunked_struct_array)
+    result = pa.Table.from_struct_array(struct_chunked_array)

Review Comment:
   Sorry for the nitpik btw
   
   I'm trying to put myself in the shoes of a maintainer who is *skeptical* 
about typing.
   
   They might see needing to adjust (working) tests to satisfy a type checker 
as a negative against typing *itself* - rather than the (unfortunate) outcome 
of a compromise 🙂 



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