public static void startScriptExecutors(QueryContext queryContext, EvalContext evalContext, Target[] targets) throws IOException { for (int i = 0; i < targets.length; i++) { EvalNode eval = targets[i].getEvalTree(); if (eval instanceof GeneralFunctionEval) { GeneralFunctionEval functionEval = (GeneralFunctionEval) eval; if (functionEval.getFuncDesc().getInvocation().hasPython()) { TajoScriptEngine scriptExecutor = new PythonScriptEngine(functionEval.getFuncDesc()); evalContext.addScriptEngine(eval, scriptExecutor); scriptExecutor.start(queryContext.getConf()); } } } }
public static void startScriptExecutors(QueryContext queryContext, EvalContext evalContext, List<Target> targets) throws IOException { for (Target target : targets) { EvalNode eval = target.getEvalTree(); if (eval instanceof GeneralFunctionEval) { GeneralFunctionEval functionEval = (GeneralFunctionEval) eval; if (functionEval.getFuncDesc().getInvocation().hasPython()) { TajoScriptEngine scriptExecutor = new PythonScriptEngine(functionEval.getFuncDesc()); evalContext.addScriptEngine(eval, scriptExecutor); scriptExecutor.start(queryContext.getConf()); } } } }
try { executor.start(context.getQueryContext().getConf()); evalContext.addScriptEngine(evalNode, executor); evalNode.bind(evalContext, null); Datum funcRes = evalNode.eval(null);
try { executor.start(context.getQueryContext().getConf()); evalContext.addScriptEngine(evalNode, executor); evalNode.bind(evalContext, null); Datum funcRes = evalNode.eval(null);
current = new GeneralFunctionEval(context, funcDesc, params); if (evalContext != null && funcDesc.getInvocation().hasPython()) { evalContext.addScriptEngine(current, new PythonScriptEngine(funcDesc)); evalContext.addScriptEngine(current, new PythonScriptEngine(funcDesc, aggFunc.isFirstPhase(), aggFunc.isLastPhase()));
current = new GeneralFunctionEval(context, funcDesc, params); if (evalContext != null && funcDesc.getInvocation().hasPython()) { evalContext.addScriptEngine(current, new PythonScriptEngine(funcDesc)); evalContext.addScriptEngine(current, new PythonScriptEngine(funcDesc, aggFunc.isFirstPhase(), aggFunc.isLastPhase()));