Skip to content

Conversation

@sdf-jkl
Copy link
Contributor

@sdf-jkl sdf-jkl commented Jul 28, 2025

Which issue does this PR close?

We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax.

Rationale for this change

Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.

What changes are included in this PR?

There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.

Are these changes tested?

We typically require tests for all PRs in order to:

  1. Prevent the code from being accidentally broken by subsequent changes
  2. Serve as another way to document the expected behavior of the code

If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?

Are there any user-facing changes?

If there are user-facing changes then we may require documentation to be updated before approving the PR.

If there are any breaking changes to public APIs, please call them out.

@github-actions github-actions bot added the parquet Changes to the parquet crate label Jul 28, 2025
@sdf-jkl sdf-jkl changed the title Variant from iterator [Variant] impl FromIterator for VariantPath Jul 28, 2025
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 @sdf-jkl 🙏 this is great

FYI @scovich

Comment on lines 49 to 52
/// let path3 = VariantPath::from_iter([
/// VariantPathElement::field("foo"),
/// VariantPathElement::index(0)
/// ]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we could show using the collect syntax too -- something like

Suggested change
/// let path3 = VariantPath::from_iter([
/// VariantPathElement::field("foo"),
/// VariantPathElement::index(0)
/// ]);
/// let path3 = [
/// VariantPathElement::field("foo"),
/// VariantPathElement::index(0)
/// ].into_iter().collect::<VariantPath>()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense

@alamb alamb merged commit 00a2f73 into apache:main Jul 29, 2025
12 checks passed
@sdf-jkl sdf-jkl deleted the variant-from-iterator branch August 6, 2025 19:54
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.

[Variant] impl FromIterator fpr VariantPath

2 participants