jorisvandenbossche commented on code in PR #14061:
URL: https://github.com/apache/arrow/pull/14061#discussion_r964810455
##########
python/pyarrow/tests/test_csv.py:
##########
@@ -654,6 +654,19 @@ def row_num(x):
expected_rows = [InvalidRow(2, 1, row_num(2), "c")]
assert parse_opts.invalid_row_handler.rows == expected_rows
+ # Test ser/de
+ parse_opts.invalid_row_handler = InvalidRowHandler('skip')
+ state = parse_opts.__getstate__()
+
+ parse_opts = ParseOptions()
+ parse_opts.__setstate__(state)
Review Comment:
Instead of calling getstate/setstate explicitly, can you pickle/unpickle
instead? (like `new_parse_opts = pickle.loads(pickle.dumps(parse_opts))`)
--
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]