Skip to content

Conversation

@robertwb
Copy link
Contributor

@robertwb robertwb commented Jul 2, 2022

This covers everything through section 4, Transforms.

Also implements missing transforms CoGroupByKey and Partition and
fixes a bug in DoubleCoder.


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

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • 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

See CI.md for more information about GitHub Actions CI.

This covers everything through section 4, Transforms.

Also implements missing transforms CoGroupByKey and Partition and
fixes a bug in DoubleCoder.
@github-actions
Copy link
Contributor

github-actions bot commented Jul 2, 2022

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

const dView = new DataView(barr.buffer);
reader.float();
const barr = new Uint8Array(reader.buf);
const dView = new DataView(barr.buffer.slice(reader.pos, reader.pos + 8));
Copy link
Member

Choose a reason for hiding this comment

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

this seems to add a new allocation plus copy (via slice) to the decode function, right? what's the issue that this solves? Is there a way to solve this without the extra copy?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The problem was that despite constructing the barr as new Uint8Array(reader.buf, reader.pos, 8), barr.buffer still refers to the entire (non-cropped) underlying buffer. This means the coder failed whenever the value was not the first element in the stream (as it is in js_coders, hence the added test, as well as in iterables, as a second element, etc.) I didn't see a way to avoid the extra copy, but it's only 8 bytes (as opposed to an unbounded amount) so hopefully that should be relatively cheap.

Copy link
Member

@pabloem pabloem left a comment

Choose a reason for hiding this comment

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

thanks @robertwb ! left one comment and all else LGTM. In fact, it looks awesome

@pabloem
Copy link
Member

pabloem commented Jul 6, 2022

@pabloem
Copy link
Member

pabloem commented Jul 8, 2022

lgtm!

@codecov
Copy link

codecov bot commented Jul 8, 2022

Codecov Report

Merging #22137 (22b00b7) into master (eb5b7cc) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff            @@
##           master   #22137    +/-   ##
========================================
  Coverage   74.21%   74.22%            
========================================
  Files         702      702            
  Lines       92826    92951   +125     
========================================
+ Hits        68891    68992   +101     
- Misses      22667    22691    +24     
  Partials     1268     1268            
Flag Coverage Δ
python 83.60% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...s/python/apache_beam/examples/snippets/snippets.py 76.70% <100.00%> (ø)
...python/apache_beam/runners/worker/worker_status.py 77.53% <0.00%> (-2.18%) ⬇️
...n/apache_beam/ml/gcp/recommendations_ai_test_it.py 73.46% <0.00%> (-2.05%) ⬇️
sdks/python/apache_beam/io/source_test_utils.py 88.01% <0.00%> (-1.39%) ⬇️
sdks/python/apache_beam/io/localfilesystem.py 90.97% <0.00%> (-0.76%) ⬇️
...ache_beam/runners/dataflow/ptransform_overrides.py 90.12% <0.00%> (-0.62%) ⬇️
sdks/python/apache_beam/runners/direct/executor.py 96.46% <0.00%> (-0.55%) ⬇️
sdks/python/apache_beam/typehints/schemas.py 94.32% <0.00%> (-0.34%) ⬇️
...ks/python/apache_beam/runners/worker/sdk_worker.py 88.62% <0.00%> (-0.32%) ⬇️
...dks/python/apache_beam/options/pipeline_options.py 94.76% <0.00%> (-0.21%) ⬇️
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eb5b7cc...22b00b7. Read the comment docs.

@robertwb
Copy link
Contributor Author

robertwb commented Jul 8, 2022

Run PythonDocs PreCommit

@github-actions
Copy link
Contributor

github-actions bot commented Jul 8, 2022

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

R: @pabloem for label python.

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

@robertwb
Copy link
Contributor Author

robertwb commented Jul 8, 2022

Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)

@robertwb
Copy link
Contributor Author

robertwb commented Jul 8, 2022

Run PythonLint PreCommit

@robertwb
Copy link
Contributor Author

robertwb commented Jul 8, 2022

Daemon vm is shutting down... The daemon has exited normally or was terminated in response to a user interrupt.

@robertwb
Copy link
Contributor Author

robertwb commented Jul 8, 2022

Run PythonLint PreCommit

@robertwb
Copy link
Contributor Author

robertwb commented Jul 8, 2022

Run PythonDocs PreCommit

@robertwb
Copy link
Contributor Author

robertwb commented Jul 8, 2022

Run Python PreCommit

@robertwb
Copy link
Contributor Author

robertwb commented Jul 8, 2022

Run Portable_Python PreCommit

@robertwb robertwb merged commit f641c24 into apache:master Jul 9, 2022
konstantinurysov pushed a commit to akvelon/beam that referenced this pull request Jul 14, 2022
This covers everything through section 4, Transforms.

Also implements missing transforms CoGroupByKey and Partition and
fixes a bug in DoubleCoder.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants