Skip to content
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

Minor: Return option from row_group_row_count #10973

Merged
merged 2 commits into from
Jun 18, 2024

Conversation

marvinlanhenke
Copy link
Contributor

Which issue does this PR close?

Closes #10965.

Rationale for this change

As stated in #10965:

[...] even when there are no row group statistics, but it doesn't make logical sense. Furthermore, for data pages, it is different if the "page index" is not present as then it doesn't even make sense to ask how many rows are in each data page as we don't have any data pages. Thus I think row_group_row_counts should also default to returning None [...]

What changes are included in this PR?

  • changed return type of row_group_row_count
  • fixed downstream consumers

Are these changes tested?

Yes.

Are there any user-facing changes?

@github-actions github-actions bot added the core Core DataFusion crate label Jun 18, 2024
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @marvinlanhenke -- this looks like a great improvement to me and makes the API more consistent

@alamb alamb merged commit a2c9d1a into apache:main Jun 18, 2024
23 checks passed
findepi pushed a commit to findepi/datafusion that referenced this pull request Jul 16, 2024
* refactor: return Option from row_group_row_count

* fix: doctest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core DataFusion crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change StatisticsConverter::row_group_counts to return None for non existent columns in parquet files
2 participants