You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/12/29 14:27:18 UTC

[GitHub] [arrow] pitrou commented on a change in pull request #12012: ARROW-15116: [Python] Expose invalid_row_handler for CSV reader

pitrou commented on a change in pull request #12012:
URL: https://github.com/apache/arrow/pull/12012#discussion_r776351896



##########
File path: python/pyarrow/tests/test_csv.py
##########
@@ -109,6 +109,27 @@ def check_options_class_pickling(cls, **attr_values):
         assert getattr(new_opts, name) == value
 
 
+class InvalidRowHandler:
+    def __init__(self, result):
+        self.result = result
+        self.rows = []
+
+    def __call__(self, row):
+        self.rows.append(row)
+        if isinstance(self.result, Exception):
+            raise self.result

Review comment:
       I hoped to use it, but the exception is simply printed out and pytest has no simple way of catching that. I'll just remove this instead.




-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org