/** * Get the Class of the UDF. */ public Class<?> getFunctionClass() { if (isGenericUDF()) { if (genericUDF instanceof GenericUDFBridge) { return ((GenericUDFBridge) genericUDF).getUdfClass(); } else { return genericUDF.getClass(); } } else if (isGenericUDAF()) { if (genericUDAFResolver instanceof GenericUDAFBridge) { return ((GenericUDAFBridge) genericUDAFResolver).getUDAFClass(); } else { return genericUDAFResolver.getClass(); } } else if (isGenericUDTF()) { return genericUDTF.getClass(); } if(isTableFunction()) { return this.tableFunctionResolver; } return null; }
/** * Get the Class of the UDF. */ public Class<?> getFunctionClass() { if (isGenericUDF()) { if (genericUDF instanceof GenericUDFBridge) { return ((GenericUDFBridge) genericUDF).getUdfClass(); } else { return genericUDF.getClass(); } } else if (isGenericUDAF()) { if (genericUDAFResolver instanceof GenericUDAFBridge) { return ((GenericUDAFBridge) genericUDAFResolver).getUDAFClass(); } else { return genericUDAFResolver.getClass(); } } else if (isGenericUDTF()) { return genericUDTF.getClass(); } if(isTableFunction()) { return this.tableFunctionResolver; } return null; }
/** * Both UDF and UDAF functions can imply order for analytical functions * * @param functionName * name of function * @return true if a GenericUDF or GenericUDAF exists for this name and implyOrder is true, false * otherwise. * @throws SemanticException */ public static boolean impliesOrder(String functionName) throws SemanticException { FunctionInfo info = getFunctionInfo(functionName); if (info != null && info.isGenericUDF()) { UDFType type = AnnotationUtils.getAnnotation(info.getGenericUDF().getClass(), UDFType.class); if (type != null) { return type.impliesOrder(); } } WindowFunctionInfo windowInfo = getWindowFunctionInfo(functionName); if (windowInfo != null) { return windowInfo.isImpliesOrder(); } return false; }
/** * Both UDF and UDAF functions can imply order for analytical functions * * @param functionName * name of function * @return true if a GenericUDF or GenericUDAF exists for this name and implyOrder is true, false * otherwise. * @throws SemanticException */ public static boolean impliesOrder(String functionName) throws SemanticException { FunctionInfo info = getFunctionInfo(functionName); if (info != null && info.isGenericUDF()) { UDFType type = AnnotationUtils.getAnnotation(info.getGenericUDF().getClass(), UDFType.class); if (type != null) { return type.impliesOrder(); } } WindowFunctionInfo windowInfo = getWindowFunctionInfo(functionName); if (windowInfo != null) { return windowInfo.isImpliesOrder(); } return false; }
/** * Get the Class of the UDF. */ public Class<?> getFunctionClass() { if (isGenericUDF()) { if (genericUDF instanceof GenericUDFBridge) { return ((GenericUDFBridge) genericUDF).getUdfClass(); } else { return genericUDF.getClass(); } } else if (isGenericUDAF()) { if (genericUDAFResolver instanceof GenericUDAFBridge) { return ((GenericUDAFBridge) genericUDAFResolver).getUDAFClass(); } else { return genericUDAFResolver.getClass(); } } else if (isGenericUDTF()) { return genericUDTF.getClass(); } return null; }
/** * Get the Class of the UDF. */ public Class<?> getFunctionClass() { if (isGenericUDF()) { if (genericUDF instanceof GenericUDFBridge) { return ((GenericUDFBridge) genericUDF).getUdfClass(); } else { return genericUDF.getClass(); } } else if (isGenericUDAF()) { if (genericUDAFResolver instanceof GenericUDAFBridge) { return ((GenericUDAFBridge) genericUDAFResolver).getUDAFClass(); } else { return genericUDAFResolver.getClass(); } } else if (isGenericUDTF()) { return genericUDTF.getClass(); } if(isTableFunction()) { return this.tableFunctionResolver; } return null; }
/** * Both UDF and UDAF functions can imply order for analytical functions * * @param functionName * name of function * @return true if a GenericUDF or GenericUDAF exists for this name and implyOrder is true, false * otherwise. * @throws SemanticException */ public static boolean impliesOrder(String functionName) throws SemanticException { FunctionInfo info = getFunctionInfo(functionName); if (info != null && info.isGenericUDF()) { UDFType type = AnnotationUtils.getAnnotation(info.getGenericUDF().getClass(), UDFType.class); if (type != null) { return type.impliesOrder(); } } WindowFunctionInfo windowInfo = getWindowFunctionInfo(functionName); if (windowInfo != null) { return windowInfo.isImpliesOrder(); } return false; }