Examples of FunctionInfo


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

          throw new SemanticException(ErrorMsg.NON_COLLECTION_TYPE.getMsg(expr,
              myt.getTypeName()));
        }
      } else {
        // other operators or functions
        FunctionInfo fi = FunctionRegistry.getFunctionInfo(funcText);

        if (fi == null) {
          if (isFunction) {
            throw new SemanticException(ErrorMsg.INVALID_FUNCTION
                .getMsg((ASTNode) expr.getChild(0)));
          } else {
            throw new SemanticException(ErrorMsg.INVALID_FUNCTION.getMsg(expr));
          }
        }

        // getGenericUDF() actually clones the UDF. Just call it once and reuse.
        GenericUDF genericUDF = fi.getGenericUDF();

        if (!fi.isNative()) {
          ctx.getUnparseTranslator().addIdentifierTranslation(
              (ASTNode) expr.getChild(0));
        }

        // Handle type casts that may contain type parameters
        if (isFunction) {
          ASTNode funcNameNode = (ASTNode)expr.getChild(0);
          switch (funcNameNode.getType()) {
            case HiveParser.TOK_VARCHAR:
              // Add type params
              VarcharTypeParams varcharTypeParams = new VarcharTypeParams();
              varcharTypeParams.length = Integer.valueOf((funcNameNode.getChild(0).getText()));
              if (genericUDF != null) {
                ((SettableUDF)genericUDF).setParams(varcharTypeParams);
              }
              break;
            default:
              // Do nothing
              break;
          }
        }

        // Detect UDTF's in nested SELECT, GROUP BY, etc as they aren't
        // supported
        if (fi.getGenericUDTF() != null) {
          throw new SemanticException(ErrorMsg.UDTF_INVALID_LOCATION.getMsg());
        }
        // UDAF in filter condition, group-by caluse, param of funtion, etc.
        if (fi.getGenericUDAFResolver() != null) {
          if (isFunction) {
            throw new SemanticException(ErrorMsg.UDAF_INVALID_LOCATION.
                getMsg((ASTNode) expr.getChild(0)));
          } else {
            throw new SemanticException(ErrorMsg.UDAF_INVALID_LOCATION.getMsg(expr));
View Full Code Here

Examples of org.apache.jasper.deploy.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.cfeclipse.cfml.parser.FunctionInfo

        if (state.getIDocument().getPartition(state.getOffset()).getType().equals(CFPartitionScanner.CF_SCRIPT)) {
          CFDocument doc = ((ICFDocument) state.getIDocument()).getCFDocument();
          CFNodeList funknodes = doc.getDocumentRoot().selectNodes(
              "//ASTFunctionDeclaration[#startpos<" + state.getOffset() + "]");
          if (funknodes.size() > 0) {
            FunctionInfo funknode = (FunctionInfo) funknodes.get(funknodes.size() - 1);
            Function func = doc.getFunctionByName(funknode.getFunctionName());
            if (func != null) {
              params = func.getParameters();
              return prepareProposals(state, params);
            } else {
              return null;
View Full Code Here

Examples of org.drools.eclipse.DRLInfo.FunctionInfo

        synchronized ( getThread() ) {
            RuleInfo ruleInfo = getExecutingRuleInfo();
            if ( ruleInfo != null ) {
                return ruleInfo.getConsequenceDrlLineNumber() + (super.getLineNumber() - ruleInfo.getConsequenceJavaLineNumber() - 1);
            }
            FunctionInfo functionInfo = getExecutingFunctionInfo();
            if ( functionInfo != null ) {
                return functionInfo.getDrlLineNumber() + (super.getLineNumber() - functionInfo.getJavaLineNumber());
            }
        }

        return super.getLineNumber();
    }
View Full Code Here

Examples of org.drools.eclipse.DRLInfo.FunctionInfo

        if ( drlInfo != null ) {
            RuleInfo ruleInfo = drlInfo.getRuleInfo( lineNumber );
            if ( ruleInfo != null ) {
                return ruleInfo.getClassName();
            }
            FunctionInfo functionInfo = drlInfo.getFunctionInfo( lineNumber );
            if ( functionInfo != null ) {
                return functionInfo.getClassName();
            }
        }
        throw new CoreException( new Status( IStatus.ERROR, DroolsEclipsePlugin.getUniqueIdentifier(), 0,
                                             "Cannot determine ruleClassName for " + resource + " " + lineNumber, null ) );
    }
View Full Code Here

Examples of org.drools.eclipse.DRLInfo.FunctionInfo

                        return line;
                    }
                    return line+1;
                }
            }
            FunctionInfo functionInfo = drlInfo.getFunctionInfo( lineNumber );
            if ( functionInfo != null ) {
                return functionInfo.getJavaLineNumber()
                    + (lineNumber - functionInfo.getDrlLineNumber());
            }
        }
        throw new CoreException( new Status( IStatus.ERROR, DroolsEclipsePlugin.getUniqueIdentifier(), 0,
                                             "Cannot determine ruleLineNumber for " + resource + " " + lineNumber, null ) );
    }
View Full Code Here

Examples of org.drools.eclipse.DRLInfo.FunctionInfo

        synchronized ( getThread() ) {
            RuleInfo ruleInfo = getExecutingRuleInfo();
            if ( ruleInfo != null ) {
                return ruleInfo.getConsequenceDrlLineNumber() + (super.getLineNumber() - ruleInfo.getConsequenceJavaLineNumber() - 1);
            }
            FunctionInfo functionInfo = getExecutingFunctionInfo();
            if ( functionInfo != null ) {
                return functionInfo.getDrlLineNumber() + (super.getLineNumber() - functionInfo.getJavaLineNumber());
            }
        }

        return super.getLineNumber();
    }
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.