[BEAM-1858] New copy for error when Create called w/zero items#2401
[BEAM-1858] New copy for error when Create called w/zero items#2401wtanaka wants to merge 1 commit intoapache:masterfrom
Conversation
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
|
R: @tgroh |
| "Elements must be provided to construct the default Create Coder. To Create an empty " | ||
| + "PCollection, either call Create.empty(Coder), or call 'withCoder(Coder)' on the " | ||
| + "result PTransform"); | ||
| "This Create class cannot deduce a Coder because it has zero " + |
There was a problem hiding this comment.
This isn't actually correct. The Create instance is what can't produce a default coder; if it were given elements, it may be able to.
Perhaps "Could not construct the default create Coder for this Create PTransform because it has no elements...."
There was a problem hiding this comment.
@tgroh I don't think I'm following your comment. There's no instance of Create here, it's a static method. And the error message proposed in the patch says that the reason that it can't deduce a Coder is because it has zero elements. Perhaps what you are saying is that the correct verb to use is "given" instead of "have".
I have doubts about your idea to say "Could not construct" because this function is lower level than the "of()" function -- is it true that this function would only get called during construction? Let me take another crack at this and see what you think.
| + "result PTransform"); | ||
| "This Create class cannot deduce a Coder because it has zero " + | ||
| "elements. Either add elements, or call Create.empty(Coder), or" + | ||
| " call 'withCoder(Coder)' on the PTransform returned from Create" + |
There was a problem hiding this comment.
The 'Create.empty(TypeDescriptor)' and 'Create.withType(TypeDescriptor)' are also valid.
|
Refer to this link for build results (access rights to CI server needed): |
tgroh
left a comment
There was a problem hiding this comment.
Looks good. Minor change, then should be good to go.
| "Elements must be provided to construct the default Create Coder. To Create an empty " | ||
| + "PCollection, either call Create.empty(Coder), or call 'withCoder(Coder)' on the " | ||
| + "result PTransform"); | ||
| "Can not determine a default Coder for a PTransform that has no elements. Either add " |
There was a problem hiding this comment.
replace PTransform with Create PTransform or Create Transform
|
Refer to this link for build results (access rights to CI server needed): |
|
Refer to this link for build results (access rights to CI server needed): |
No description provided.