1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-10-31 18:30:33 +03:00

MDEV-32854: Make JSON_DEPTH_LIMIT unlimited

This patch is the columnstore-part of the task. Columnstore wanted to have
previous 32 depth, so this patch aims at keeping the compatibility.
This commit is contained in:
Rucha Deodhar
2025-05-22 15:42:12 +05:30
committed by Leonid Fedorov
parent 9a2ebebaf9
commit 9fe37d5919
50 changed files with 1047 additions and 952 deletions

View File

@@ -335,7 +335,17 @@ int cmpPartJSPath(const json_path_step_t* a, const json_path_step_t* aEnd, const
int cmpJSPath(const json_path_t* a, const json_path_t* b, enum json_value_types vt, const int* arraySize)
{
#if MYSQL_VERSION_ID >= 120200
json_path_step_t *a_last_step= reinterpret_cast<json_path_step_t*>
(mem_root_dynamic_array_get_val((MEM_ROOT_DYNAMIC_ARRAY*)&a->steps, (size_t)a->last_step_idx));
json_path_step_t *b_last_step= reinterpret_cast<json_path_step_t*>
(mem_root_dynamic_array_get_val((MEM_ROOT_DYNAMIC_ARRAY*)&b->steps, (size_t)b->last_step_idx));
return cmpPartJSPath((reinterpret_cast<json_path_step_t*>(a->steps.buffer)) + 1, a_last_step,
(reinterpret_cast<json_path_step_t*>(b->steps.buffer)) + 1, b_last_step,
vt, arraySize);
#else
return cmpPartJSPath(a->steps + 1, a->last_step, b->steps + 1, b->last_step, vt, arraySize);
#endif
}
int parseJSPath(JSONPath& path, rowgroup::Row& row, execplan::SPTP& parm, bool wildcards)
@@ -355,7 +365,7 @@ int parseJSPath(JSONPath& path, rowgroup::Row& row, execplan::SPTP& parm, bool w
return 0;
}
bool matchJSPath(const vector<funcexp::JSONPath>& paths, const json_path_t* p, json_value_types valType,
bool matchJSPath(const std::vector<funcexp::JSONPath>& paths, const json_path_t* p, json_value_types valType,
[[maybe_unused]] const int* arrayCounter, bool exact)
{
for (size_t curr = 0; curr < paths.size(); curr++)
@@ -371,5 +381,7 @@ bool matchJSPath(const vector<funcexp::JSONPath>& paths, const json_path_t* p, j
}
return false;
}
} // namespace helpers
} // namespace funcexp