/** * Typically a WindowFunction is the same as a UDAF. The only exceptions are Lead & Lag UDAFs. These * are not registered as regular UDAFs because * - we plan to support Lead & Lag as UDFs (usable only within argument expressions * of UDAFs when windowing is involved). Since mFunctions holds both UDFs and UDAFs we cannot * add both FunctionInfos to mFunctions. * * @param name * @param wFn */ void registerWindowFunction(String name, GenericUDAFResolver wFn) { FunctionType functionType = isNative ? FunctionType.BUILTIN : FunctionType.TEMPORARY; addFunction(WINDOW_FUNC_PREFIX + name, new WindowFunctionInfo(functionType, name, wFn, null)); }
/** * Typically a WindowFunction is the same as a UDAF. The only exceptions are Lead & Lag UDAFs. These * are not registered as regular UDAFs because * - we plan to support Lead & Lag as UDFs (usable only within argument expressions * of UDAFs when windowing is involved). Since mFunctions holds both UDFs and UDAFs we cannot * add both FunctionInfos to mFunctions. * * @param name * @param wFn */ void registerWindowFunction(String name, GenericUDAFResolver wFn) { FunctionType functionType = isNative ? FunctionType.BUILTIN : FunctionType.TEMPORARY; addFunction(WINDOW_FUNC_PREFIX + name, new WindowFunctionInfo(functionType, name, wFn, null)); }
private FunctionInfo registerGenericUDAF(String functionName, FunctionType functionType, GenericUDAFResolver genericUDAFResolver, FunctionResource... resources) { FunctionInfo function = new WindowFunctionInfo(functionType, functionName, genericUDAFResolver, resources); addFunction(functionName, function); addFunction(WINDOW_FUNC_PREFIX + functionName, function); return function; }
private FunctionInfo registerGenericUDAF(String functionName, FunctionType functionType, GenericUDAFResolver genericUDAFResolver, FunctionResource... resources) { FunctionInfo function = new WindowFunctionInfo(functionType, functionName, genericUDAFResolver, resources); addFunction(functionName, function); addFunction(WINDOW_FUNC_PREFIX + functionName, function); return function; }
private FunctionInfo registerUDAF(String functionName, FunctionType functionType, Class<? extends UDAF> udafClass, FunctionResource... resources) { validateClass(udafClass, UDAF.class); FunctionInfo function = new WindowFunctionInfo(functionType, functionName, new GenericUDAFBridge(ReflectionUtil.newInstance(udafClass, null)), resources); addFunction(functionName, function); addFunction(WINDOW_FUNC_PREFIX + functionName, function); return function; }
private FunctionInfo registerUDAF(String functionName, FunctionType functionType, Class<? extends UDAF> udafClass, FunctionResource... resources) { validateClass(udafClass, UDAF.class); FunctionInfo function = new WindowFunctionInfo(functionType, functionName, new GenericUDAFBridge(ReflectionUtil.newInstance(udafClass, null)), resources); addFunction(functionName, function); addFunction(WINDOW_FUNC_PREFIX + functionName, function); return function; }
/** * Typically a WindowFunction is the same as a UDAF. The only exceptions are Lead & Lag UDAFs. These * are not registered as regular UDAFs because * - we plan to support Lead & Lag as UDFs (usable only within argument expressions * of UDAFs when windowing is involved). Since mFunctions holds both UDFs and UDAFs we cannot * add both FunctionInfos to mFunctions. * * @param name * @param wFn */ void registerWindowFunction(String name, GenericUDAFResolver wFn) { addFunction(WINDOW_FUNC_PREFIX + name, new WindowFunctionInfo(isNative, name, wFn, null)); }
public FunctionInfo registerGenericUDAF(String functionName, GenericUDAFResolver genericUDAFResolver, FunctionResource... resources) { FunctionInfo function = new WindowFunctionInfo(isNative, functionName, genericUDAFResolver, resources); addFunction(functionName, function); addFunction(WINDOW_FUNC_PREFIX + functionName, function); return function; }
public FunctionInfo registerUDAF(String functionName, Class<? extends UDAF> udafClass, FunctionResource... resources) { validateClass(udafClass, UDAF.class); FunctionInfo function = new WindowFunctionInfo(isNative, functionName, new GenericUDAFBridge(ReflectionUtils.newInstance(udafClass, null)), resources); addFunction(functionName, function); addFunction(WINDOW_FUNC_PREFIX + functionName, function); return function; }