[BEAM-2792] Translate basic coders through the Runner API#3746
Closed
robertwb wants to merge 4 commits intoapache:masterfrom
Closed
[BEAM-2792] Translate basic coders through the Runner API#3746robertwb wants to merge 4 commits intoapache:masterfrom
robertwb wants to merge 4 commits intoapache:masterfrom
Conversation
313de69 to
19ef059
Compare
Contributor
Author
|
R: @tgroh |
tgroh
approved these changes
Aug 24, 2017
| return cls() | ||
|
|
||
|
|
||
| @Coder.register_urn(urns.PICKLED_CODER, google.protobuf.wrappers_pb2.BytesValue) |
Member
There was a problem hiding this comment.
With the update to payload, might this be 'None' instead of BytesValue?
Contributor
Author
There was a problem hiding this comment.
No, though we may consider accepting "str" here.
| @staticmethod | ||
| def from_runner_api(proto, context): | ||
| """For internal use only; no backwards-compatibility guarantees. | ||
| def register_simple_urn(urn, cls): |
Member
There was a problem hiding this comment.
The Java name we use is "Structured" (formerly "Standard"); I prefer it to "simple", because it suggests something about the coder (it's not just defined by a blob of bytes)
Contributor
Author
There was a problem hiding this comment.
Changed, though even ufuncs with payloads may be "structured" (e.g. the "standard" windowing fns).
Contributor
Author
|
Is "approved" equivalent to an LGTM? |
| def register_urn(cls, urn, parameter_type, fn=None): | ||
| """Registeres a urn with a constructor. | ||
|
|
||
| For example, if 'beam:fn:foo' had paramter type FooPayload, one could |
|
|
||
| @classmethod | ||
| def register_urn(cls, urn, parameter_type, fn=None): | ||
| """Registeres a urn with a constructor. |
Contributor
Author
|
Unrelated java setup failure. Jenkins: retest this please. |
Member
|
Yeah, approved and LGTM occupy the same "I think this can be submitted" space |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow this checklist to help us incorporate your contribution quickly and easily:
[BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replaceBEAM-XXXwith the appropriate JIRA issue.mvn clean verifyto make sure basic checks pass. A more thorough check will be performed on your pull request automatically.