HappenLee commented on code in PR #63301:
URL: https://github.com/apache/doris/pull/63301#discussion_r3256179465


##########
be/src/util/jsonb_document.h:
##########
@@ -1002,6 +1002,30 @@ struct ArrayVal : public ContainerVal {
     const_iterator end() const { return const_iterator((pointer)(payload + 
size)); }
 };
 
+namespace jsonb_detail {
+
+inline bool array_contains_value(const ArrayVal* target_array, const 
JsonbValue* candidate) {
+    const int target_num = target_array->numElem();
+    for (int i = 0; i < target_num; ++i) {
+        if (target_array->get(i)->contains(candidate)) {
+            return true;
+        }
+    }
+    return false;
+}
+
+inline bool array_contains_array(const ArrayVal* target_array, const ArrayVal* 
candidate_array) {

Review Comment:
   what happen if `SELECT json_contains('[1]', '[1,1]');  `, should return true?



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to