-
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-12240: [Python] Fix invalid-offsetof warning #10154
Conversation
1cd2e07
to
77495bf
Compare
Looks we cannot simply using the unique_ptr trick here. arrow/python/pyarrow/tests/test_dataset.py Line 617 in ca83a14
All compute kernel options are not pickle-able as we've embedded unique_ptr, will it be a problem? |
I'll take a look at the pickling issue. |
Cool 👍 . Will update other csv options based on your change. Possibly also the computer kernel options. |
arrow::csv::ConvertOptions has stl container data members which are not guaranteed to be standard layout type. It causes invalid-offsetof warning when compiled with clang-12. This patch changes directly embedded CCSVConvertOptions to unique_ptr to fix the issue. ReadOptions and WriteOptions are also updated. ParseOptions is left untouched. It needs to be persistent with pickle. Pointer data member must be serialized.
bc5ab0d
to
7728915
Compare
7728915
to
fe4cc2b
Compare
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.
+1, thank you @cyb70289
arrow::csv::ConvertOptions has stl container data members which are not guaranteed to be standard layout type. It causes invalid-offsetof warning when compiled with clang-12. This patch changes directly embedded CCSVConvertOptions to unique_ptr to fix the issue. Parse and Read options are also updated. Closes apache#10154 from cyb70289/12240-invalid-offsetof Lead-authored-by: Yibo Cai <[email protected]> Co-authored-by: Antoine Pitrou <[email protected]> Signed-off-by: Antoine Pitrou <[email protected]>
arrow::csv::ConvertOptions has stl container data members which are not guaranteed to be standard layout type. It causes invalid-offsetof warning when compiled with clang-12. This patch changes directly embedded CCSVConvertOptions to unique_ptr to fix the issue. Parse and Read options are also updated. Closes apache#10154 from cyb70289/12240-invalid-offsetof Lead-authored-by: Yibo Cai <[email protected]> Co-authored-by: Antoine Pitrou <[email protected]> Signed-off-by: Antoine Pitrou <[email protected]>
arrow::csv::ConvertOptions has stl container data members which are not guaranteed to be standard layout type. It causes invalid-offsetof warning when compiled with clang-12. This patch changes directly embedded CCSVConvertOptions to unique_ptr to fix the issue. Parse and Read options are also updated. Closes apache#10154 from cyb70289/12240-invalid-offsetof Lead-authored-by: Yibo Cai <[email protected]> Co-authored-by: Antoine Pitrou <[email protected]> Signed-off-by: Antoine Pitrou <[email protected]>
arrow::csv::ConvertOptions has stl container data members which are
not guaranteed to be standard layout type. It causes invalid-offsetof
warning when compiled with clang-12.
This patch changes directly embedded CCSVConvertOptions to unique_ptr
to fix the issue. Parse and Read options are also updated.