Skip to content

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

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

pitrou merged 2 commits into
apache:mainfrom
adamreeve:compression_level_segfault

Conversation

@adamreeve

@adamreeve adamreeve commented Oct 4, 2023 •

Copy link
Copy Markdown
Contributor

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

mapleFU commented Oct 5, 2023

Copy link
Copy Markdown
Member

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

@mapleFU mapleFU left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@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

github-actions Bot commented Oct 5, 2023

Copy link
Copy Markdown

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

@pitrou pitrou left a comment

Copy link
Copy Markdown
Member

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
@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 <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
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 <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
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