foskey51 commented on code in PR #9012:
URL: https://github.com/apache/arrow-rs/pull/9012#discussion_r2637085626


##########
parquet-variant/src/path.rs:
##########
@@ -112,11 +114,7 @@ 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> {
     fn from(path: &'a str) -> Self {
-        if path.is_empty() {
-            VariantPath::new(vec![])
-        } else {
-            VariantPath::new(path.split('.').map(Into::into).collect())
-        }
+        VariantPath::new(path.split(".").flat_map(parse_path).collect())

Review Comment:
   I initially considered using `TryFrom` with explicit error boundaries , but 
doing so would require changing an existing public API, which would be a 
breaking change
   
https://github.com/apache/arrow-rs/blob/240cbf4f838387445b0209db4b14dbb277b05a12/parquet-variant-compute/src/shred_variant.rs#L709-L717
   and as @scovich mentioned the current approach can also parse invalid inputs 
as fields, making debugging hard. So I'm a bit skeptical about how to proceed 
from here.
    
   



-- 
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]

Reply via email to