scovich commented on code in PR #9479:
URL: https://github.com/apache/arrow-rs/pull/9479#discussion_r2855507656


##########
parquet-variant/src/utils.rs:
##########
@@ -267,9 +268,17 @@ fn parse_in_bracket(s: &str, i: usize) -> 
Result<(VariantPathElement<'_>, usize)
         }
     };
 
-    let element = match unescaped.parse() {
-        Ok(idx) => VariantPathElement::index(idx),
-        Err(_) => VariantPathElement::field(unescaped),
+    let element = if let Some(inner) = unescaped
+        .strip_prefix('\'')
+        .and_then(|s| s.strip_suffix('\''))
+    {
+        // Quoted field name, e.g., ['field'] or ['123']
+        VariantPathElement::field(inner.to_string())

Review Comment:
   Ah! This function already handles `\'` escape syntax, L247 above.



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