DKER2 commented on code in PR #11232:
URL: https://github.com/apache/arrow-rs/pull/11232#discussion_r4371202530


##########
parquet-variant/src/utils.rs:
##########
@@ -243,26 +243,33 @@ fn parse_in_bracket(s: &str, i: usize) -> 
Result<(VariantPathElement<'_>, usize)
         match c {
             // Escape: take next char literally
             '\\' => {
+                let unescaped =
+                    unescaped.get_or_insert_with(|| 
String::from(&s[start..start + offset]));
                 if let Some((_, next)) = chars.next() {
                     unescaped.push(next);
                 }
                 // Trailing backslash will be handled as 'unclosed [' below
             }
             '\'' | '"' if quote == Some(c) => {
                 quote = None;
-                unescaped.push(c);
+                if let Some(unescaped) = &mut unescaped {
+                    unescaped.push(c);

Review Comment:
   a case like ['abc\]xyz'] need this



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