Examples of UndefinedFunctionException


Examples of eu.admire.dispel.parser.exception.UndefinedFunctionException

                optimiser,
                executionState);
           
            if (function == null)
            {
                throw new UndefinedFunctionException(
                    resolvedFunctionName, functionArguments);
            }
        }
       
        LOG.debug("Executing function call : " + resolvedFunctionName);
View Full Code Here

Examples of eu.admire.dispel.parser.exception.UndefinedFunctionException

        Map<String, Type> parameters = function.getParameters();
        Map<Integer, String> indices = function.getIndices();
        Map<String, Integer> arrayDimensions = function.getArrayDimensions();
        if (arguments.size() != parameters.size())
        {
            throw new UndefinedFunctionException(function.getName(), arguments);
        }
        for (int i=0; i<arguments.size(); i++)
        {
            Object value =
                arguments.get(i).evaluate(executionState.getVariables());
View Full Code Here

Examples of eu.admire.dispel.parser.exception.UndefinedFunctionException

        throws UndefinedFunctionException
    {
        Function function = mFunctions.get(functionName);
        if (function == null)
        {
            throw new UndefinedFunctionException(
                functionName, functionArguments);
        }
        return function;
    }
View Full Code Here

Examples of org.apache.tajo.engine.exception.UndefinedFunctionException

          block.setHasGrouping();

          return new AggregationFunctionCallEval(countRows, (AggFunction) countRows.newInstance(),
              new EvalNode[] {});
        } catch (InternalException e) {
          throw new UndefinedFunctionException(CatalogUtil.
              getCanonicalName(countRows.getSignature(), new DataType[]{}));
        }
      }
      case GeneralSetFunction: {
        GeneralSetFunctionExpr setFunction = (GeneralSetFunctionExpr) expr;
        Expr[] params = setFunction.getParams();
        EvalNode[] givenArgs = new EvalNode[params.length];
        DataType[] paramTypes = new DataType[params.length];

        FunctionType functionType = setFunction.isDistinct() ?
            FunctionType.DISTINCT_AGGREGATION : FunctionType.AGGREGATION;
        givenArgs[0] = createEvalTree(plan, block, params[0]);
        if (setFunction.getSignature().equalsIgnoreCase("count")) {
          paramTypes[0] = CatalogUtil.newSimpleDataType(TajoDataTypes.Type.ANY);
        } else {
          paramTypes[0] = givenArgs[0].getValueType();
        }

        if (!catalog.containFunction(setFunction.getSignature(), functionType, paramTypes)) {
          throw new UndefinedFunctionException(CatalogUtil. getCanonicalName(setFunction.getSignature(), paramTypes));
        }

        FunctionDesc funcDesc = catalog.getFunction(setFunction.getSignature(), functionType, paramTypes);
        if (!block.hasGroupbyNode()) {
          block.setHasGrouping();
        }
        try {
          return new AggregationFunctionCallEval(funcDesc, (AggFunction) funcDesc.newInstance(), givenArgs);
        } catch (InternalException e) {
          e.printStackTrace();
        }
      }
      break;

      case Function:
        FunctionExpr function = (FunctionExpr) expr;
        // Given parameters
        Expr[] params = function.getParams();
        EvalNode[] givenArgs = new EvalNode[params.length];
        DataType[] paramTypes = new DataType[params.length];

        for (int i = 0; i < params.length; i++) {
            givenArgs[i] = createEvalTree(plan, block, params[i]);
            paramTypes[i] = givenArgs[i].getValueType();
        }

        if (!catalog.containFunction(function.getSignature(), paramTypes)) {
            throw new UndefinedFunctionException(CatalogUtil.getCanonicalName(function.getSignature(), paramTypes));
        }

        FunctionDesc funcDesc = catalog.getFunction(function.getSignature(), paramTypes);

        try {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.