-
Notifications
You must be signed in to change notification settings - Fork 3k
Spark (4.0, 3.5): Set data file sort_order_id in manifest for writes from Spark
#14683
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
Conversation
|
|
||
| public org.apache.iceberg.SortOrder icebergOrdering() { | ||
| return icebergOrdering; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not in love with this approach, but I went through a couple of iterations of this and plumbing the intended Iceberg SortOrder along through with the Spark SortOrder ended up being the cleanest in my opinion (open to any suggestions of course). I initially had an approach which would attempt to re-guess the Iceberg SortOrder from a Spark SortOrder. It worked pretty well, but was pretty naive in my opinion—the algorithm was to essentially reverse the Iceberg -> Spark SortOrder transformation as best as possible and then see if things matched up. It gets complicated when you start to consider Spark Orderings for stuff like say a positionDeltaUpdateMergeOrdering.
--------- Co-authored-by: nk1506 <nk1506@gmail.com> Co-authored-by: Kevin Liu <kevinjqliu@users.noreply.github.com>
Bumps [actions/labeler](https://github.com/actions/labeler) from 5 to 6. - [Release notes](https://github.com/actions/labeler/releases) - [Commits](actions/labeler@v5...v6) --- updated-dependencies: - dependency-name: actions/labeler dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](actions/setup-python@v5...v6) --- updated-dependencies: - dependency-name: actions/setup-python dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/stale](https://github.com/actions/stale) from 9.1.0 to 10.1.0. - [Release notes](https://github.com/actions/stale/releases) - [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md) - [Commits](actions/stale@v9.1.0...v10.1.0) --- updated-dependencies: - dependency-name: actions/stale dependency-version: 10.1.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…14693) Bumps software.amazon.awssdk:bom from 2.39.2 to 2.39.4. --- updated-dependencies: - dependency-name: software.amazon.awssdk:bom dependency-version: 2.39.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v4...v5) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v3...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Notify ci-jobs@iceberg.apache.org when Github Workflow fails
…14718) Bumps software.amazon.awssdk:bom from 2.39.4 to 2.39.5. --- updated-dependencies: - dependency-name: software.amazon.awssdk:bom dependency-version: 2.39.5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
) Bumps [datamodel-code-generator](https://github.com/koxudaxi/datamodel-code-generator) from 0.35.0 to 0.36.0. - [Release notes](https://github.com/koxudaxi/datamodel-code-generator/releases) - [Commits](koxudaxi/datamodel-code-generator@0.35.0...0.36.0) --- updated-dependencies: - dependency-name: datamodel-code-generator dependency-version: 0.36.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [com.google.errorprone:error_prone_annotations](https://github.com/google/error-prone) from 2.44.0 to 2.45.0. - [Release notes](https://github.com/google/error-prone/releases) - [Commits](google/error-prone@v2.44.0...v2.45.0) --- updated-dependencies: - dependency-name: com.google.errorprone:error_prone_annotations dependency-version: 2.45.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…uetMetricsRowGroupFilter` (apache#14013) Co-authored-by: Sreesh Maheshwar <smaheshwar@palantir.com>
Bumps [com.azure:azure-sdk-bom](https://github.com/azure/azure-sdk-for-java) from 1.3.2 to 1.3.3. - [Release notes](https://github.com/azure/azure-sdk-for-java/releases) - [Commits](Azure/azure-sdk-for-java@azure-sdk-bom_1.3.2...azure-sdk-bom_1.3.3) --- updated-dependencies: - dependency-name: com.azure:azure-sdk-bom dependency-version: 1.3.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
|
I am willing to help as well :) I just introduced a new child to my family so I have been gone for a few of those months but I will do my best to stay on top of any new developments. Feel free to ping me on slack as well |
…etection (apache#14940) * BigQuery: Reuse table from doRefresh() in updateTable() to reduce API calls
Yeah I totally get it. I've just had a slew of interesting experiences in this project, so I want to be certain that if I'm putting in the work that someone else is in it with me 😄 .
Sweet yeah as I allude to in the PR description, I also have a patch that does this on a private fork. It works quite well in a narrower set of circumstances—you need to ensure that partitions don't get too skewed or large. But in the set of circumstances that things are roughly even, the performance improvement is drastic. I'd be happy to take a look at your implementation and give feedback/lessons learned from ours.
Sounds good! Totally understand—life happens. I just wanted to make sure before putting a bunch of effort in that it would be matched this time. I look forwards to working together! |
|
Alright I've rebased to the latest master. I can split out the changes if you'd like @RussellSpitzer. It seems like 4.1 is state of the art now, so would you like a PR that:
Or would you like it if we kept the current PR and ported forward to 4.1 as it seems like there hasn't been an official iceberg release for Spark 4.1. I'm assuming both are fine as I think the 4.1 setup must be more recent so stuff will probably forward/backport super cleanly. |
|
Hi @jbewing - We discussed this PR in the community, and I would like to help move these forward with the help of other reviewers. It seems like something went wrong with the rebase. Could you please rebase your change and make a single PR with just 4.1? I will do the same with my PR. Community prefers that way as it's easier to review. We can have a subsequent PR that back ports to all older branches (in one PR). Usually that will not take much time in reviews. |
|
One single PR against 4.1 would be ideal IMHO. Unless you have multiple independent bits you want to get in one at a time. |
|
Hey @anuragmantri & @RussellSpitzer , will do. I thought I was going to be able to get to it this weekend but wasn't able to find the time, but should have some time in the next couple days. Just wanted to give an update to let you know that I had seen this and am getting to it (just not as quickly as I would've liked to) |
|
@RussellSpitzer & @anuragmantri, I've opened up #15150. We can move conversation there as I'm closing this PR in favor of that one. |
This PR updates all writes from Spark 4.0 & 3.5 to set the
sort_order_idof data files when applicable per the Iceberg Table Spec. I've opened this PR to:This is a successor to my initial PR #13636 which has since been closed for being stale (but I've revived it here and ported the changes forwards to spark 4.0). I've re-opened this PR as of late there has been some increased interest in this:
sort_order_idin manifest when writing/compacting data files #13636 (comment)So it appears that there is value to these changes being upstreamed instead of confined to a fork.
Testing
I've added tests for newer added utility functions and updated existing tests that write data files and compact data files in a sorted manner to verify that we're setting the
sort_order_identry in the manifests to the correct value. Additionally, I've used this patch on an internal fork and verified that it correctly sets this field during compaction and normal writes.Issue: #13634