-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ARROW-17641: [python] Fix ParseOptions deserialization of invalid_row_handler #14061
ARROW-17641: [python] Fix ParseOptions deserialization of invalid_row_handler #14061
Conversation
…_handler Signed-off-by: Kai Fricke <[email protected]>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, good catch!
python/pyarrow/tests/test_csv.py
Outdated
parse_opts.invalid_row_handler = InvalidRowHandler('skip') | ||
state = parse_opts.__getstate__() | ||
|
||
parse_opts = ParseOptions() | ||
parse_opts.__setstate__(state) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of calling getstate/setstate explicitly, can you pickle/unpickle instead? (like new_parse_opts = pickle.loads(pickle.dumps(parse_opts))
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, updated!
I've also updated __getstate__
to return self.invalid_row_handler
instead of self._invalid_row_handler
, let me know if this looks good to you.
Signed-off-by: Kai Fricke <[email protected]>
Thanks for fixing this, this is great! @krfricke has a little more context on the bug here: ray-project/ray#28326 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Benchmark runs are scheduled for baseline = 47314c3 and contender = 6ff5224. 6ff5224 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
…_handler (apache#14061) Authored-by: Kai Fricke <[email protected]> Signed-off-by: Joris Van den Bossche <[email protected]>
…_handler (apache#14061) Authored-by: Kai Fricke <[email protected]> Signed-off-by: Joris Van den Bossche <[email protected]>
No description provided.