Package org.apache.tajo.catalog

Examples of org.apache.tajo.catalog.FunctionDesc.newInstance()


    try {
    CatalogProtos.FunctionType functionType = funcDesc.getFuncType();
    if (functionType == CatalogProtos.FunctionType.GENERAL
        || functionType == CatalogProtos.FunctionType.UDF) {
      return new GeneralFunctionEval(funcDesc, (GeneralFunction) funcDesc.newInstance(), givenArgs);
    } else if (functionType == CatalogProtos.FunctionType.AGGREGATION
        || functionType == CatalogProtos.FunctionType.UDA) {
      if (!ctx.currentBlock.hasNode(NodeType.GROUP_BY)) {
        ctx.currentBlock.setAggregationRequire();
      }
View Full Code Here


    } else if (functionType == CatalogProtos.FunctionType.AGGREGATION
        || functionType == CatalogProtos.FunctionType.UDA) {
      if (!ctx.currentBlock.hasNode(NodeType.GROUP_BY)) {
        ctx.currentBlock.setAggregationRequire();
      }
      return new AggregationFunctionCallEval(funcDesc, (AggFunction) funcDesc.newInstance(), givenArgs);
    } else if (functionType == CatalogProtos.FunctionType.DISTINCT_AGGREGATION
        || functionType == CatalogProtos.FunctionType.DISTINCT_UDA) {
      throw new PlanningException("Unsupported function: " + funcDesc.toString());
    } else {
      throw new PlanningException("Unsupported Function Type: " + functionType.name());
View Full Code Here

    }

    try {
      ctx.currentBlock.setAggregationRequire();

      return new AggregationFunctionCallEval(countRows, (AggFunction) countRows.newInstance(),
          new EvalNode[] {});
    } catch (InternalException e) {
      throw new NoSuchFunctionException(countRows.getSignature(), new TajoDataTypes.DataType[]{});
    }
  }
View Full Code Here

    if (!ctx.currentBlock.hasNode(NodeType.GROUP_BY)) {
      ctx.currentBlock.setAggregationRequire();
    }

    try {
      return new AggregationFunctionCallEval(funcDesc, (AggFunction) funcDesc.newInstance(), givenArgs);
    } catch (InternalException e) {
      throw new PlanningException(e);
    }
  }
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.