private static List<ReadEntity> getPermanentFunctionEntities(SessionState ss) throws HiveException { List<ReadEntity> functionEntities = new ArrayList<>(); for (Entry<String, FunctionInfo> permFunction : ss.getCurrentFunctionsInUse().entrySet()) { if (permFunction.getValue().getFunctionType() != FunctionType.PERSISTENT) { // Only permanent functions need to be authorized. // Built-in function access is allowed to all users. // If user can create a temp function, they should be able to use it // without additional authorization. continue; } functionEntities.add(createReadEntity(permFunction.getKey(), permFunction.getValue())); } return functionEntities; }
private static FunctionInfo handleCastForParameterizedType(TypeInfo ti, FunctionInfo fi) { SettableUDF udf = (SettableUDF) fi.getGenericUDF(); try { udf.setTypeInfo(ti); } catch (UDFArgumentException e) { throw new RuntimeException(e); } return new FunctionInfo( fi.getFunctionType(), fi.getDisplayName(), (GenericUDF) udf, fi.getResources()); }
private static FunctionInfo handleCastForParameterizedType(TypeInfo ti, FunctionInfo fi) { SettableUDF udf = (SettableUDF) fi.getGenericUDF(); try { udf.setTypeInfo(ti); } catch (UDFArgumentException e) { throw new RuntimeException(e); } return new FunctionInfo( fi.getFunctionType(), fi.getDisplayName(), (GenericUDF) udf, fi.getResources()); }
outStream.writeBytes("Function type:" + functionInfo.getFunctionType() + "\n"); FunctionResource[] resources = functionInfo.getResources(); if (resources != null) {
outStream.writeBytes("Function type:" + functionInfo.getFunctionType() + "\n"); FunctionResource[] resources = functionInfo.getResources(); if (resources != null) {