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

Spark 3.4: Cosmetic updates for SparkPositionDeltaWrite #7650

Merged
merged 2 commits into from
May 19, 2023

Conversation

aokolnychyi
Copy link
Contributor

This PR contains minor cosmetic updates for SparkPositionDeltaWrite.

@github-actions github-actions bot added the spark label May 18, 2023
@aokolnychyi
Copy link
Contributor Author

cc @szehon-ho, one more small PR

partitionProjections.put(
specID, StructProjection.create(partitionType, spec.partitionType())));

for (Map.Entry<Integer, PartitionSpec> entry : specs.entrySet()) {
Copy link
Collaborator

@szehon-ho szehon-ho May 18, 2023

Choose a reason for hiding this comment

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

Nit: could we save some code by streaming over keySet()?

for (int specId : specs.keyset()) {
Partition spec = specs.get(specId);
...
}

Itd be nice to do a values transform, but guess there's no clean way here

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 like it, even though it does an extra lookup. Changed.

@aokolnychyi aokolnychyi merged commit 24490b0 into apache:master May 19, 2023
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants