Skip to content

refactor(examples): remove redundant call to create directory in parquet_embedded_index.rs #16825

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
Jul 21, 2025

Conversation

jcsherin
Copy link
Contributor

Which issue does this PR close?

  • Closes #.

Rationale for this change

There is no need for create_dir_all. The directory is already created by TempDir::new()?, and if that call fails, an error is immediately propagated without ever reaching this line.

What changes are included in this PR?

Removes redundant call to create_dir_all.

Are these changes tested?

Verified that the expected output remains the same with or without the changes.

$ cargo run --example parquet_embedded_indexcargo run --example parquet_embedded_index
...
Reading index at offset: 70, length
Read distinct index for c.parquet: "c.parquet"
Filtering for category: foo
Scanning only files: ["c.parquet", "a.parquet"]
+----------+
| category |
+----------+
| foo      |
| foo      |
| foo      |
+----------+

Are there any user-facing changes?

No.

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.

Thanks @jcsherin

@xudong963 xudong963 merged commit 350c61b into apache:main Jul 21, 2025
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants