Skip to content

GH-38039: [C++][Parquet] Fix segfault getting compression level for a Parquet column#38025

Merged
pitrou merged 2 commits intoapache:mainfrom
adamreeve:compression_level_segfault
Oct 5, 2023
Merged

GH-38039: [C++][Parquet] Fix segfault getting compression level for a Parquet column#38025
pitrou merged 2 commits intoapache:mainfrom
adamreeve:compression_level_segfault

Conversation

@adamreeve
Copy link
Copy Markdown
Contributor

@adamreeve adamreeve commented Oct 4, 2023

Rationale for this change

After the changes in #35886, getting the compression level for a Parquet column segfaults if the compression level or other options weren't previously set

What changes are included in this PR?

Adds a null check on the codec options of the column properties before trying to access the compression level.

Are these changes tested?

Yes, I added a unit test.

Are there any user-facing changes?

This fixes a regression added after 13.0.0 so isn't a user-facing fix

@mapleFU
Copy link
Copy Markdown
Member

mapleFU commented Oct 5, 2023

Would you mind create an issue for this? I guess this is not a "minor" fix for arrow github manangement

Copy link
Copy Markdown
Member

@mapleFU mapleFU left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions github-actions bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Oct 5, 2023
@pitrou pitrou changed the title MINOR: [C++][Parquet] Fix segfault getting compression level for a Parquet column GH-38039: [C++][Parquet] Fix segfault getting compression level for a Parquet column Oct 5, 2023
@github-actions
Copy link
Copy Markdown

github-actions bot commented Oct 5, 2023

⚠️ GitHub issue #38039 has been automatically assigned in GitHub to PR creator.

Copy link
Copy Markdown
Member

@pitrou pitrou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, thanks a lot @adamreeve . I created an issue for this and will merge.

@pitrou pitrou merged commit 0fbfffb into apache:main Oct 5, 2023
@pitrou pitrou removed the awaiting committer review Awaiting committer review label Oct 5, 2023
@adamreeve
Copy link
Copy Markdown
Contributor Author

Thanks for making the issue @pitrou, and apologies for not making one to start with, I should have read the contributing doc more closely

@adamreeve adamreeve deleted the compression_level_segfault branch October 5, 2023 20:30
@conbench-apache-arrow
Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit 0fbfffb.

There were 10 benchmark results indicating a performance regression:

The full Conbench report has more details.

loicalleyne pushed a commit to loicalleyne/arrow that referenced this pull request Nov 13, 2023
… for a Parquet column (apache#38025)

### Rationale for this change

After the changes in apache#35886, getting the compression level for a Parquet column segfaults if the compression level or other options weren't previously set

### What changes are included in this PR?

Adds a null check on the codec options of the column  properties before trying to access the compression level.

### Are these changes tested?

Yes, I added a unit test.

### Are there any user-facing changes?

This fixes a regression added after 13.0.0 so isn't a user-facing fix
* Closes: apache#38039

Authored-by: Adam Reeve <adreeve@gmail.com>
Signed-off-by: Antoine Pitrou <antoine@python.org>
dgreiss pushed a commit to dgreiss/arrow that referenced this pull request Feb 19, 2024
… for a Parquet column (apache#38025)

### Rationale for this change

After the changes in apache#35886, getting the compression level for a Parquet column segfaults if the compression level or other options weren't previously set

### What changes are included in this PR?

Adds a null check on the codec options of the column  properties before trying to access the compression level.

### Are these changes tested?

Yes, I added a unit test.

### Are there any user-facing changes?

This fixes a regression added after 13.0.0 so isn't a user-facing fix
* Closes: apache#38039

Authored-by: Adam Reeve <adreeve@gmail.com>
Signed-off-by: Antoine Pitrou <antoine@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[C++][Parquet] Segfault getting compression level for a Parquet column

3 participants