Skip to content

[BEAM-1858] New copy for error when Create called w/zero items#2401

Closed
wtanaka wants to merge 1 commit intoapache:masterfrom
wtanaka:master
Closed

[BEAM-1858] New copy for error when Create called w/zero items#2401
wtanaka wants to merge 1 commit intoapache:masterfrom
wtanaka:master

Conversation

@wtanaka
Copy link
Contributor

@wtanaka wtanaka commented Apr 1, 2017

No description provided.

@asfbot
Copy link

asfbot commented Apr 1, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/9051/
--none--

@wtanaka wtanaka changed the title New copy for error when Create called w/zero items [BEAM-1858] New copy for error when Create called w/zero items Apr 1, 2017
@wtanaka
Copy link
Contributor Author

wtanaka commented Apr 1, 2017

@peihe @aviemzur

@asfbot
Copy link

asfbot commented Apr 1, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/9052/
--none--

@aviemzur
Copy link
Member

aviemzur commented Apr 2, 2017

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 " +
Copy link
Member

@tgroh tgroh Apr 3, 2017

Choose a reason for hiding this comment

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

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...."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@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" +
Copy link
Member

Choose a reason for hiding this comment

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

The 'Create.empty(TypeDescriptor)' and 'Create.withType(TypeDescriptor)' are also valid.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will add

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 69.813% when pulling 3b30027 on wtanaka:master into 810db7f on apache:master.

@asfbot
Copy link

asfbot commented Apr 9, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/9327/
--none--

Copy link
Member

@tgroh tgroh left a comment

Choose a reason for hiding this comment

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

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 "
Copy link
Member

Choose a reason for hiding this comment

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

replace PTransform with Create PTransform or Create Transform

@asfbot
Copy link

asfbot commented Apr 13, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/9490/
--none--

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.003%) to 70.089% when pulling 447fcc4 on wtanaka:master into 21a2b96 on apache:master.

@asfbot
Copy link

asfbot commented Apr 13, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/9491/
--none--

Copy link
Member

@tgroh tgroh left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@asfgit asfgit closed this in 2f400e2 Apr 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants