alamb commented on code in PR #9276:
URL: https://github.com/apache/arrow-rs/pull/9276#discussion_r2734135205
##########
parquet-variant/src/path.rs:
##########
@@ -112,9 +128,11 @@ impl<'a> From<Vec<VariantPathElement<'a>>> for
VariantPath<'a> {
}
/// Create from &str with support for dot notation
-impl<'a> From<&'a str> for VariantPath<'a> {
Review Comment:
This is a breaking API (which is fine, I think, we should just make sure we
have the API right this time)
##########
parquet-variant/src/path.rs:
##########
@@ -103,6 +113,12 @@ impl<'a> VariantPath<'a> {
pub fn is_empty(&self) -> bool {
self.0.is_empty()
}
+
+ /// Parses a path string, panics on invalid input.
+ /// Only use for tests for known-valid input.
+ pub fn from_str_unchecked(s: &'a str) -> Self {
Review Comment:
In rust and other parts of this crate the "unchecked" word is often used to
denote `unsafe` code -- specifically that could lead to undefined behavior
I suggest we don't call it "unchecked"
I think just `from_str` is probably fine ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]