Examples of FunctionInfo


Examples of javax.servlet.jsp.tagext.FunctionInfo

                                            "jsp.error.attribute.invalidPrefix",
                                            prefix);
                        }
                    }
                    TagLibraryInfo taglib = pageInfo.getTaglib(uri);
                    FunctionInfo funcInfo = null;
                    if (taglib != null) {
                        funcInfo = taglib.getFunction(function);
                    }
                    if (funcInfo == null) {
                        err.jspError(n, "jsp.error.noFunction", function);
View Full Code Here

Examples of org.apache.catalina.deploy.jsp.FunctionInfo

         // Function
         if (tldMetaData.getFunctions() != null)
         {
            for (FunctionMetaData functionMetaData : tldMetaData.getFunctions())
            {
               FunctionInfo functionInfo = new FunctionInfo();
               functionInfo.setName(functionMetaData.getName());
               functionInfo.setFunctionClass(functionMetaData.getFunctionClass());
               functionInfo.setFunctionSignature(functionMetaData.getFunctionSignature());
               tagLibraryInfo.addFunctionInfo(functionInfo);
            }
         }
        
         if (jarPath == null && relativeLocation == null)
View Full Code Here

Examples of org.apache.catalina.deploy.jsp.FunctionInfo

            }
        }
        // Function
        if (tldMetaData.getFunctions() != null) {
            for (FunctionMetaData functionMetaData : tldMetaData.getFunctions()) {
                FunctionInfo functionInfo = new FunctionInfo();
                functionInfo.setName(functionMetaData.getName());
                functionInfo.setFunctionClass(functionMetaData.getFunctionClass());
                functionInfo.setFunctionSignature(functionMetaData.getFunctionSignature());
                tagLibraryInfo.addFunctionInfo(functionInfo);
            }
        }

        if (jarPath == null && relativeLocation == null) {
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.FunctionInfo

      if (expressionTree.getChild(0).getType() == HiveParser.Identifier) {
        String functionName = unescapeIdentifier(expressionTree.getChild(0)
            .getText());
        if (FunctionRegistry.getGenericUDAFResolver(functionName) != null) {
          aggregations.put(expressionTree.toStringTree(), expressionTree);
          FunctionInfo fi = FunctionRegistry.getFunctionInfo(functionName);
          if (!fi.isNative()) {
            unparseTranslator.addIdentifierTranslation((ASTNode) expressionTree
                .getChild(0));
          }
          return;
        }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.FunctionInfo

    int udtfExprType = udtfExpr.getType();
    if (udtfExprType == HiveParser.TOK_FUNCTION
        || udtfExprType == HiveParser.TOK_FUNCTIONSTAR) {
      String funcName = TypeCheckProcFactory.DefaultExprProcessor
          .getFunctionText(udtfExpr, true);
      FunctionInfo fi = FunctionRegistry.getFunctionInfo(funcName);
      if (fi != null) {
        genericUDTF = fi.getGenericUDTF();
      }
      isUDTF = (genericUDTF != null);
      if (isUDTF && !fi.isNative()) {
        unparseTranslator.addIdentifierTranslation((ASTNode) udtfExpr
            .getChild(0));
      }
    }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.FunctionInfo

    this.distinct = distinct;
  }
 
  @explain(displayName="expr")
  public String getExprString() {
    FunctionInfo fI = FunctionRegistry.getInfo(aggregationClass);
    StringBuilder sb = new StringBuilder();
    sb.append(fI.getDisplayName());
    sb.append("(");
    if (distinct) {
      sb.append("DISTINCT ");
    }
    boolean first = true;
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.FunctionInfo

  }
 
  @explain(displayName="expr")
  @Override
  public String getExprString() {
    FunctionInfo fI = FunctionRegistry.getInfo(UDFClass);
    StringBuilder sb = new StringBuilder();
   
    if (fI.getOpType() == FunctionInfo.OperatorType.PREFIX ||
        fI.isAggFunction()) {
      sb.append(fI.getDisplayName());
      if (!fI.isOperator()) {
        sb.append("(");
      }
      else {
        sb.append(" ");
      }
     
      boolean first = true;
      for(exprNodeDesc chld: children) {
        if (!first) {
          sb.append(", ");
        }
        first = false;
       
        sb.append(chld.getExprString());
      }
     
      if(!fI.isOperator()) {
        sb.append(")");
      }
    }
    else if (fI.getOpType() == FunctionInfo.OperatorType.INFIX) {
      // assert that this has only 2 children
      assert(children.size() == 2);
      sb.append("(");
      sb.append(children.get(0).getExprString());
      sb.append(" ");
      sb.append(fI.getDisplayName());
      sb.append(" ");
      sb.append(children.get(1).getExprString());
      sb.append(")");
    }
    else if (fI.getOpType() == FunctionInfo.OperatorType.POSTFIX) {
      // assert for now as there should be no such case
      assert(children.size() == 1);
      sb.append(children.get(0).getExprString());
      sb.append(" ");
      sb.append(fI.getDisplayName());
    }
   
    return sb.toString();
  }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.FunctionInfo

        if (FunctionRegistry.getGenericUDAFResolver(functionName) != null) {
          if(containsLeadLagUDF(expressionTree)) {
            throw new SemanticException(ErrorMsg.MISSING_OVER_CLAUSE.getMsg(functionName));
          }
          aggregations.put(expressionTree.toStringTree(), expressionTree);
          FunctionInfo fi = FunctionRegistry.getFunctionInfo(functionName);
          if (!fi.isNative()) {
            unparseTranslator.addIdentifierTranslation((ASTNode) expressionTree
                .getChild(0));
          }
          return;
        }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.FunctionInfo

    int udtfExprType = udtfExpr.getType();
    if (udtfExprType == HiveParser.TOK_FUNCTION
        || udtfExprType == HiveParser.TOK_FUNCTIONSTAR) {
      String funcName = TypeCheckProcFactory.DefaultExprProcessor
          .getFunctionText(udtfExpr, true);
      FunctionInfo fi = FunctionRegistry.getFunctionInfo(funcName);
      if (fi != null) {
        genericUDTF = fi.getGenericUDTF();
      }
      isUDTF = (genericUDTF != null);
      if (isUDTF) {
        globalLimitCtx.setHasTransformOrUDTF(true);
      }
      if (isUDTF && !fi.isNative()) {
        unparseTranslator.addIdentifierTranslation((ASTNode) udtfExpr
            .getChild(0));
      }
      if (isUDTF && (selectStar = udtfExprType == HiveParser.TOK_FUNCTIONSTAR)) {
        genColListRegex(".*", null, (ASTNode) udtfExpr.getChild(0),
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.FunctionInfo

     * @throws UDFArgumentException
     */
    static ExprNodeDesc getFuncExprNodeDescWithUdfData(String udfName, Object udfData,
        ExprNodeDesc... children) throws UDFArgumentException {

      FunctionInfo fi = FunctionRegistry.getFunctionInfo(udfName);
      if (fi == null) {
        throw new UDFArgumentException(udfName + " not found.");
      }

      GenericUDF genericUDF = fi.getGenericUDF();
      if (genericUDF == null) {
        throw new UDFArgumentException(udfName
            + " is an aggregation function or a table function.");
      }

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.