Skip to content

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
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