Skip to content

Minor: rename ParquetRecordBatchStream::reader to ParquetRecordBatchStream::reader_factory #7319

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

Merged
merged 1 commit into from
Mar 26, 2025

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Mar 21, 2025

Which issue does this PR close?

Rationale for this change

ParquetRecordBatchStream is complicated (not unecessairly so), and it is hard for me to keep track of all the various readers, which gets all the more complicated with #6921 from @XiangpengHao

It turns out the field named reader on ParquetRecordBatchStream is actually a ReaderFactory.

What changes are included in this PR?

Change the name of the field to reflect that it is a factory that makes readers, not a reader itself

Are there any user-facing changes?

No, this is an internal code change

@github-actions github-actions bot added the parquet Changes to the parquet crate label Mar 21, 2025
@@ -557,7 +557,7 @@ impl<T: AsyncFileReader + Send + 'static> ParquetRecordBatchStreamBuilder<T> {
let batch_size = self
.batch_size
.min(self.metadata.file_metadata().num_rows() as usize);
let reader = ReaderFactory {
let reader_factory = ReaderFactory {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

reader_factory I think better expresses that this is not a Reader but something that makes Readers

@alamb alamb changed the title Minor: rename ParquetRecordBatchStream::reader to ParquetRecordBatchStream::factory Minor: rename ParquetRecordBatchStream::reader to ParquetRecordBatchStream::reader_factory Mar 22, 2025
@alamb
Copy link
Contributor Author

alamb commented Mar 24, 2025

FYI @XiangpengHao

Copy link
Contributor

@etseidl etseidl left a comment

Choose a reason for hiding this comment

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

Looks sensible to me. 👍 Thanks!

@alamb
Copy link
Contributor Author

alamb commented Mar 25, 2025

Thanks for the review @etseidl !

@alamb alamb merged commit a01886d into apache:main Mar 26, 2025
17 checks passed
@alamb alamb deleted the alamb/rename_fields_for_clarity branch March 26, 2025 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parquet Changes to the parquet crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants