You've already forked mariadb-columnstore-engine
							
							
				mirror of
				https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
				synced 2025-11-03 17:13:17 +03:00 
			
		
		
		
	This patch is the columnstore-part of the task. Columnstore wanted to have previous 32 depth, so this patch aims at keeping the compatibility.
		
			
				
	
	
		
			52 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			52 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
#include "functor_json.h"
 | 
						|
#include "functioncolumn.h"
 | 
						|
#include "constantcolumn.h"
 | 
						|
#include "json_lib.h"
 | 
						|
#include "rowgroup.h"
 | 
						|
using namespace execplan;
 | 
						|
using namespace rowgroup;
 | 
						|
 | 
						|
#include "dataconvert.h"
 | 
						|
 | 
						|
#include "jsonhelpers.h"
 | 
						|
using namespace funcexp::helpers;
 | 
						|
 | 
						|
namespace funcexp
 | 
						|
{
 | 
						|
CalpontSystemCatalog::ColType Func_json_exists::operationType(FunctionParm& fp,
 | 
						|
                                                              CalpontSystemCatalog::ColType& /*resultType*/)
 | 
						|
{
 | 
						|
  return fp[0]->data()->resultType();
 | 
						|
}
 | 
						|
 | 
						|
/**
 | 
						|
 * getBoolVal API definition
 | 
						|
 */
 | 
						|
bool Func_json_exists::getBoolVal(Row& row, FunctionParm& fp, bool& isNull,
 | 
						|
                                  CalpontSystemCatalog::ColType& /*type*/)
 | 
						|
{
 | 
						|
  const auto js = fp[0]->data()->getStrVal(row, isNull);
 | 
						|
  if (isNull)
 | 
						|
    return false;
 | 
						|
 | 
						|
  int jsErr = 0;
 | 
						|
 | 
						|
  initJSEngine(jsEg, getCharset(fp[0]), js);
 | 
						|
  if (!path.parsed && parseJSPath(path, row, fp[1]))
 | 
						|
    goto error;
 | 
						|
 | 
						|
  if (locateJSPath(jsEg, path, &jsErr))
 | 
						|
  {
 | 
						|
    if (jsErr)
 | 
						|
      goto error;
 | 
						|
    return false;
 | 
						|
  }
 | 
						|
 | 
						|
  return true;
 | 
						|
 | 
						|
error:
 | 
						|
  isNull = true;
 | 
						|
  return false;
 | 
						|
}
 | 
						|
}  // namespace funcexp
 |