jorisvandenbossche commented on a change in pull request #10591:
URL: https://github.com/apache/arrow/pull/10591#discussion_r657765844
##########
File path: python/pyarrow/tests/test_scalars.py
##########
@@ -514,7 +515,7 @@ def test_struct():
s['non-existent']
s = pa.scalar(None, type=ty)
- assert list(s) == []
+ assert list(s) == list(s.keys()) == ['x', 'y']
Review comment:
This is a change in behaviour, but it seems more correct to me, since
you can still do `s['x']` (which gives you a null scalar). But on the other
hand it conflicts with `s.as_py()` being `None` (and not `{'x': None, 'y':
None}`)
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]