-
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
GH-39440: [Python] Calling pyarrow.dataset.ParquetFileFormat.make_write_options as a class method results in a segfault #40976
GH-39440: [Python] Calling pyarrow.dataset.ParquetFileFormat.make_write_options as a class method results in a segfault #40976
Conversation
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.
LGTM!
I don't think it makes sense to add the check here, because we would have to do that on many existing methods. Example: >>> pa.Array.get_total_buffer_size(0)
Erreur de segmentation |
Right, but I would also agree with Joris here: #39440 (comment)
|
I opened cython/cython#6127 on the Cython side. Remember that it's fine to suggest additions to third-party libraries or utilities when it's general enough that it could serve other people. |
Ah! It makes sense, then. Can you add the rationale as a comment in the source code? |
Oh cool! Broadening my horizons =) |
Co-authored-by: Antoine Pitrou <[email protected]>
After merging your PR, Conbench analyzed the 7 benchmarking runs that have been run so far on merge-commit 074d45f. There were 4 benchmark results indicating a performance regression:
The full Conbench report has more details. It also includes information about 4 possible false positives for unstable benchmarks that are known to sometimes produce them. |
… for Cython 2 (#41059) ### Rationale for this change `test_make_write_options_error` has been failing on Cython 2 crossbow build because in older versions of Cython the methods were "regular" C extension method had type check automatically built in. In Cython 3 that is not the case, see cython/cython#6127 and so the check for `ParquetFileFormat` was added in #40976. ### What changes are included in this PR? Checking the error raised for both messages, type check and the check for `ParquetFileFormat` added in #40976. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: #41043 Authored-by: AlenkaF <[email protected]> Signed-off-by: Raúl Cumplido <[email protected]>
… for Cython 2 (#41059) ### Rationale for this change `test_make_write_options_error` has been failing on Cython 2 crossbow build because in older versions of Cython the methods were "regular" C extension method had type check automatically built in. In Cython 3 that is not the case, see cython/cython#6127 and so the check for `ParquetFileFormat` was added in #40976. ### What changes are included in this PR? Checking the error raised for both messages, type check and the check for `ParquetFileFormat` added in #40976. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: #41043 Authored-by: AlenkaF <[email protected]> Signed-off-by: Raúl Cumplido <[email protected]>
…_error for Cython 2 (apache#41059) ### Rationale for this change `test_make_write_options_error` has been failing on Cython 2 crossbow build because in older versions of Cython the methods were "regular" C extension method had type check automatically built in. In Cython 3 that is not the case, see cython/cython#6127 and so the check for `ParquetFileFormat` was added in apache#40976. ### What changes are included in this PR? Checking the error raised for both messages, type check and the check for `ParquetFileFormat` added in apache#40976. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: apache#41043 Authored-by: AlenkaF <[email protected]> Signed-off-by: Raúl Cumplido <[email protected]>
…ke_write_options as a class method results in a segfault (apache#40976) ### Rationale for this change Calling `make_write_options()` method as class instead of instance method results in segfault. ### What changes are included in this PR? Adds a type check on `self` and raises an error if not `ParquetFileFormat`. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: apache#39440 Lead-authored-by: AlenkaF <[email protected]> Co-authored-by: Alenka Frim <[email protected]> Co-authored-by: Antoine Pitrou <[email protected]> Signed-off-by: AlenkaF <[email protected]>
…_error for Cython 2 (apache#41059) ### Rationale for this change `test_make_write_options_error` has been failing on Cython 2 crossbow build because in older versions of Cython the methods were "regular" C extension method had type check automatically built in. In Cython 3 that is not the case, see cython/cython#6127 and so the check for `ParquetFileFormat` was added in apache#40976. ### What changes are included in this PR? Checking the error raised for both messages, type check and the check for `ParquetFileFormat` added in apache#40976. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: apache#41043 Authored-by: AlenkaF <[email protected]> Signed-off-by: Raúl Cumplido <[email protected]>
…ke_write_options as a class method results in a segfault (apache#40976) ### Rationale for this change Calling `make_write_options()` method as class instead of instance method results in segfault. ### What changes are included in this PR? Adds a type check on `self` and raises an error if not `ParquetFileFormat`. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: apache#39440 Lead-authored-by: AlenkaF <[email protected]> Co-authored-by: Alenka Frim <[email protected]> Co-authored-by: Antoine Pitrou <[email protected]> Signed-off-by: AlenkaF <[email protected]>
…_error for Cython 2 (apache#41059) ### Rationale for this change `test_make_write_options_error` has been failing on Cython 2 crossbow build because in older versions of Cython the methods were "regular" C extension method had type check automatically built in. In Cython 3 that is not the case, see cython/cython#6127 and so the check for `ParquetFileFormat` was added in apache#40976. ### What changes are included in this PR? Checking the error raised for both messages, type check and the check for `ParquetFileFormat` added in apache#40976. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: apache#41043 Authored-by: AlenkaF <[email protected]> Signed-off-by: Raúl Cumplido <[email protected]>
…ke_write_options as a class method results in a segfault (apache#40976) ### Rationale for this change Calling `make_write_options()` method as class instead of instance method results in segfault. ### What changes are included in this PR? Adds a type check on `self` and raises an error if not `ParquetFileFormat`. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: apache#39440 Lead-authored-by: AlenkaF <[email protected]> Co-authored-by: Alenka Frim <[email protected]> Co-authored-by: Antoine Pitrou <[email protected]> Signed-off-by: AlenkaF <[email protected]>
…_error for Cython 2 (apache#41059) ### Rationale for this change `test_make_write_options_error` has been failing on Cython 2 crossbow build because in older versions of Cython the methods were "regular" C extension method had type check automatically built in. In Cython 3 that is not the case, see cython/cython#6127 and so the check for `ParquetFileFormat` was added in apache#40976. ### What changes are included in this PR? Checking the error raised for both messages, type check and the check for `ParquetFileFormat` added in apache#40976. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: apache#41043 Authored-by: AlenkaF <[email protected]> Signed-off-by: Raúl Cumplido <[email protected]>
…ke_write_options as a class method results in a segfault (apache#40976) ### Rationale for this change Calling `make_write_options()` method as class instead of instance method results in segfault. ### What changes are included in this PR? Adds a type check on `self` and raises an error if not `ParquetFileFormat`. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: apache#39440 Lead-authored-by: AlenkaF <[email protected]> Co-authored-by: Alenka Frim <[email protected]> Co-authored-by: Antoine Pitrou <[email protected]> Signed-off-by: AlenkaF <[email protected]>
…_error for Cython 2 (apache#41059) ### Rationale for this change `test_make_write_options_error` has been failing on Cython 2 crossbow build because in older versions of Cython the methods were "regular" C extension method had type check automatically built in. In Cython 3 that is not the case, see cython/cython#6127 and so the check for `ParquetFileFormat` was added in apache#40976. ### What changes are included in this PR? Checking the error raised for both messages, type check and the check for `ParquetFileFormat` added in apache#40976. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: apache#41043 Authored-by: AlenkaF <[email protected]> Signed-off-by: Raúl Cumplido <[email protected]>
…ke_write_options as a class method results in a segfault (apache#40976) ### Rationale for this change Calling `make_write_options()` method as class instead of instance method results in segfault. ### What changes are included in this PR? Adds a type check on `self` and raises an error if not `ParquetFileFormat`. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: apache#39440 Lead-authored-by: AlenkaF <[email protected]> Co-authored-by: Alenka Frim <[email protected]> Co-authored-by: Antoine Pitrou <[email protected]> Signed-off-by: AlenkaF <[email protected]>
…_error for Cython 2 (apache#41059) ### Rationale for this change `test_make_write_options_error` has been failing on Cython 2 crossbow build because in older versions of Cython the methods were "regular" C extension method had type check automatically built in. In Cython 3 that is not the case, see cython/cython#6127 and so the check for `ParquetFileFormat` was added in apache#40976. ### What changes are included in this PR? Checking the error raised for both messages, type check and the check for `ParquetFileFormat` added in apache#40976. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: apache#41043 Authored-by: AlenkaF <[email protected]> Signed-off-by: Raúl Cumplido <[email protected]>
Rationale for this change
Calling
make_write_options()
method as class instead of instance method results in segfault.What changes are included in this PR?
Adds a type check on
self
and raises an error if notParquetFileFormat
.Are these changes tested?
Yes.
Are there any user-facing changes?
No.
pyarrow.dataset.ParquetFileFormat.make_write_options
as a class method results in a segfault #39440