-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Add typescript documentation to the programing guide. #22137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This covers everything through section 4, Transforms. Also implements missing transforms CoGroupByKey and Partition and fixes a bug in DoubleCoder.
|
Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment |
| 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)); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
pabloem
left a comment
There was a problem hiding this 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
|
lgtm! |
Codecov Report
@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
|
Run PythonDocs PreCommit |
|
Assigning reviewers. If you would like to opt out of this review, comment R: @pabloem for label python. Available commands:
The PR bot will only process comments in the main thread (not review comments). |
|
Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed) |
|
Run PythonLint PreCommit |
|
Daemon vm is shutting down... The daemon has exited normally or was terminated in response to a user interrupt. |
|
Run PythonLint PreCommit |
|
Run PythonDocs PreCommit |
|
Run Python PreCommit |
|
Run Portable_Python PreCommit |
This covers everything through section 4, Transforms. Also implements missing transforms CoGroupByKey and Partition and fixes a bug in DoubleCoder.
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:
R: @username).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, commentfixes #<ISSUE NUMBER>instead.CHANGES.mdwith noteworthy changes.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)
See CI.md for more information about GitHub Actions CI.