1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-11-02 06:13:16 +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

@@ -1,5 +1,6 @@
#include "functor_json.h"
#include "functioncolumn.h"
#include "json_lib.h"
#include "rowgroup.h"
using namespace execplan;
using namespace rowgroup;
@@ -279,20 +280,20 @@ bool Func_json_overlaps::getBoolVal(Row& row, FunctionParm& fp, bool& /*isNull*/
CalpontSystemCatalog::ColType& /*type*/)
{
bool isNullJS1 = false, isNullJS2 = false;
const auto js1 = fp[0]->data()->getStrVal(row, isNullJS1);
const auto js2 = fp[1]->data()->getStrVal(row, isNullJS2);
if (isNullJS1 || isNullJS2)
return false;
json_engine_t jsEg1, jsEg2;
initJSEngine(jsEg1, getCharset(fp[0]), js1);
initJSEngine(jsEg, getCharset(fp[0]), js1);
initJSEngine(jsEg2, getCharset(fp[1]), js2);
if (json_read_value(&jsEg1) || json_read_value(&jsEg2))
if (json_read_value(&jsEg) || json_read_value(&jsEg2))
return false;
bool result = checkOverlaps(&jsEg1, &jsEg2, false);
if (unlikely(jsEg1.s.error || jsEg2.s.error))
bool result = checkOverlaps(&jsEg, &jsEg2, false);
if (unlikely(jsEg.s.error || jsEg2.s.error))
return false;
return result;