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


##########
python/pyarrow/scalar.pxi:
##########
@@ -791,8 +791,11 @@ cdef class MapScalar(ListScalar):
         """
         Iterate over this element's values.
         """
+        return self
+
+    def __next__(self):
         arr = self.values
-        if array is None:
+        if arr is None:
             raise StopIteration
         for k, v in zip(arr.field('key'), arr.field('value')):
             yield (k.as_py(), v.as_py())

Review Comment:
   Sorry. I didn't test on local before I pushed a commit because I don't have 
enough time yesterday.
   
   I reverted the `__iter__` + `__next__` change.



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