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

chore: make ParquetExec's with_file_groups public #12726

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

NGA-TRAN
Copy link
Contributor

@NGA-TRAN NGA-TRAN commented Oct 2, 2024

Which issue does this PR close?

Rationale for this change

Make ParquetExec's with_file_groups public so we can set it outside In InfluxDB

What changes are included in this PR?

Add pub in front of the said function

Are these changes tested?

I don't think the test is needed for making a function public unless I am told to do so. The compile is good enough to say it works or not

Are there any user-facing changes?

No

@github-actions github-actions bot added the core Core DataFusion crate label Oct 2, 2024
@NGA-TRAN
Copy link
Contributor Author

NGA-TRAN commented Oct 2, 2024

FYI @alamb for your review

@@ -586,7 +586,7 @@ impl ParquetExec {
)
}

fn with_file_groups(mut self, file_groups: Vec<Vec<PartitionedFile>>) -> Self {
pub fn with_file_groups(mut self, file_groups: Vec<Vec<PartitionedFile>>) -> Self {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the idea is that going forward we should use ParquetExecBuilder rather than the methods on ParquetExec itself.

Like can you use

let builder = ParquetExecBuilder::builder(exec.file_scan_config().clone())
  .with_file_groups(...)
  .build()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it will be easier to provide this

   let builder = ParquetExecBuilder::builder_from_parquet_exec(parquet_exec)
         .with_file_groups(...)
         .build()

The builder_from_parquet_exec is a new function

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree -- creating a builder from an existing ParquetExec would be helpful. I will try and make a PR for this

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.

2 participants