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
Combine builders for Vector.build
and Vector.new_builder
#9922
Conversation
If an uncaught dataflow error is appended with `append`, the dataflow | ||
error is propagated, and it is not added to the builder. |
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.
Where is the error propagated? This is unclear to me.
Do you mean that the error will be propagated to the result of calling to_vector
? Is the first such error propagated? Or last one?
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.
Or looking at the code it seems that it is raised as a wrapped panic? That should be clarified by the docs. "Propagated" is far too vague here as it has several possible meanings.
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.
Good point -- my documentation was written for build
and didn't cover new_builder
. I updated it to cover both cases, and added similar tests for new_builder
. I changed 'propagate' to 'throw' where 'propagate' is confusing.
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.
I think that since we are keeping new_builder
, we should have at least some tests of the error propagation, for example I think we should add a new_builder
variant of the
group_builder.specify "Builder should propagate an uncaught dataflow error if it is appended with .append"
test
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.
I suggest to remove Vector.new_builder
.
Pull Request Description
We have decided to keep the old new_builder, and to combine the new and old builders into one builder.
Important Notes
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
TypeScript,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.