Skip to content

Conversation

@swegner
Copy link
Contributor

@swegner swegner commented Apr 5, 2016

Be sure to do all of the following to help us incorporate your contribution
quickly and easily:

  • Make sure the PR title is formatted like:
    [BEAM-<Jira issue #>] Description of pull request
  • Make sure tests pass via mvn clean verify. (Even better, enable
    Travis-CI on your fork and ensure the whole test matrix passes).
  • Replace "<Jira issue #>" in the title with the actual Jira issue
    number, if there is one.
  • If this contribution is large, please file an Apache
    Individual Contributor License Agreement.

@swegner
Copy link
Contributor Author

swegner commented Apr 5, 2016

R: @bjchambers


@Override
public void populateDisplayData(DisplayData.Builder builder) {
Filter.populateDisplayData(builder, String.format("x ≤ %s", value));
Copy link
Contributor

Choose a reason for hiding this comment

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

@davorbonaci for comments on using unicode in the codebase. I'm not sure if we should care.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note also this'll get serialized as JSON and passed into the service. I don't see any reason we shouldn't support Unicode..

@kennknowles
Copy link
Member

Conflicts blocking test run(s).

Bound<String, String> parDo = ParDo.of(fn);

DisplayData displayData = DisplayData.from(parDo);
assertThat(displayData, includes(fn));
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add some messages here? Every time I see these tests, I expect to see something like "and make sure the fnMetadata" is there, then I need to find this and parse it.

assertThat("Copies over all data from the function", displayData, includes(fn));

Might make it easier to parse the assertions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see where you're coming from. I'd prefer to make the Matcher method self-describing rather than require a comment on each usage. Maybe something like:

assertThat(displayData, includesDisplayDataFrom(fn));

Let me take this as a follow-up item once the pending PRs go through in order to avoid merge conflicts. Tracking in BEAM-195

@swegner swegner force-pushed the displaydata-pardo branch 2 times, most recently from e71de00 to a01229b Compare April 14, 2016 20:14
@swegner
Copy link
Contributor Author

swegner commented Apr 14, 2016

I've addressed all feedback so far. Please take another look. @bjchambers

@swegner swegner force-pushed the displaydata-pardo branch from a01229b to fa16dc8 Compare April 14, 2016 20:25
.build()
);

ImmutableSet<ImmutableMap<String, Object>> expectedFn2DisplayData = ImmutableSet.of(
Copy link
Contributor

Choose a reason for hiding this comment

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

This shouldn't need to change anymore -- the Matcher based version should work, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the version that existed in my branch before mergepocolypse. It includes a few more fields which are now being serialized, and is also a stronger assertion in that it is testing for set equality rather than subset.

@bjchambers
Copy link
Contributor

LGTM.

@asfgit asfgit closed this in 0bb4f9c Apr 15, 2016
@swegner swegner deleted the displaydata-pardo branch April 20, 2016 16:50
@swegner
Copy link
Contributor Author

swegner commented May 16, 2016

Backported via GoogleCloudPlatform/DataflowJavaSDK#216

iemejia referenced this pull request in iemejia/beam Jan 12, 2018
mareksimunek pushed a commit to mareksimunek/beam that referenced this pull request May 9, 2018
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.

3 participants