xiaokang commented on code in PR #19185: URL: https://github.com/apache/doris/pull/19185#discussion_r1184550783
########## be/src/util/jsonb_document.h: ########## @@ -1099,16 +1099,33 @@ inline JsonbValue* JsonbValue::findPath(const char* key_path, unsigned int kp_le unsigned int klen = 0; const char* left_bracket = nullptr; const char* right_bracket = nullptr; + const char* left_quotation_marks = nullptr; + const char* right_quotation_marks = nullptr; size_t idx_len = 0; // find the current key and [] bracket position - for (; key_path != fence && *key_path != *delim; ++key_path, ++klen) { + for (; key_path != fence; ++key_path, ++klen) { if ('[' == *key_path) { left_bracket = key_path; } else if (']' == *key_path) { right_bracket = key_path; + } else if ('"' == *key_path) { + if (left_quotation_marks == nullptr) { Review Comment: should consider more complicated cases: 1. unclosed double quote in the key, eg. 'a".b' -> a . "b 2. there are many double quote pairs in the key, eg. '"a.b"c".d"' -> a.bc.d 3. there is double quote escape in the key, eg. 'a".b.\"c"' -> a.b".c -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org