beam icon indicating copy to clipboard operation
beam copied to clipboard

Return methods in a lexicographical order from ReflectUtils.getMethods()

Open bzablocki opened this issue 1 year ago • 11 comments

Fixes #30276. Returning methods in lexicographical order will prevent non-deterministic schema inference.


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • [ ] Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • [ ] Update CHANGES.md with noteworthy changes.
  • [ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels Python tests Java tests Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

bzablocki avatar Feb 09 '24 16:02 bzablocki

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

github-actions[bot] avatar Feb 09 '24 17:02 github-actions[bot]

This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the [email protected] list. Thank you for your contributions.

github-actions[bot] avatar Apr 13 '24 12:04 github-actions[bot]

assign set of reviewers

bzablocki avatar Apr 18 '24 10:04 bzablocki

Assigning reviewers. If you would like to opt out of this review, comment assign to next reviewer:

R: @m-trieu for label java.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

github-actions[bot] avatar Apr 18 '24 11:04 github-actions[bot]

Reminder, please take a look at this pr: @m-trieu

github-actions[bot] avatar Apr 26 '24 12:04 github-actions[bot]

R: @kennknowles for final approval

github-actions[bot] avatar Apr 26 '24 13:04 github-actions[bot]

How does it work for update compatibility if I add a new field to my POJO? I added Reuven because he knows the most about this.

kennknowles avatar Apr 29 '24 14:04 kennknowles

Dataflow keeps track of the old and new schema, and will match up fields to ensure that the encoding position remains the same even if the field orders are different. This is the reason why schemas have an encoding position in addition to a field number.

Sorting the fields is not needed for update, and in fact is not a solution since Dataflow supports adding new fields to a schema via update (if we relied on sorting the new field would end up in the middle of the list, and would break update).

On Mon, Apr 29, 2024 at 7:53 AM Kenn Knowles @.***> wrote:

How does it work for update compatibility if I add a new field to my POJO? I added Reuven because he knows the most about this.

— Reply to this email directly, view it on GitHub https://github.com/apache/beam/pull/30279#issuecomment-2082958359, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFAYJVOTCZO2RRBFYYXKJZLY7ZNHNAVCNFSM6AAAAABDBXMF4GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBSHE2TQMZVHE . You are receiving this because your review was requested.Message ID: @.***>

reuvenlax avatar Apr 29 '24 16:04 reuvenlax

Excellent. I was worried this would cause update incompatibility just as you described. But it sounds like it is fine. 👍

kennknowles avatar May 01 '24 00:05 kennknowles

Reminder, please take a look at this pr: @kennknowles

github-actions[bot] avatar May 15 '24 12:05 github-actions[bot]

Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment assign to next reviewer:

R: @damondouglas for label java.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

github-actions[bot] avatar May 20 '24 12:05 github-actions[bot]

stop reviewer notifications

bzablocki avatar May 28 '24 08:05 bzablocki

Stopping reviewer notifications for this pull request: requested by reviewer

github-actions[bot] avatar May 28 '24 08:05 github-actions[bot]

After talking to @reuvenlax we concluded that this might not be the best way to solve this issue. We'll try to reproduce this problem first and then try to address the root cause. I'll close this PR for now.

bzablocki avatar Jun 05 '24 11:06 bzablocki