private IFunctionDescriptor resolveFunction(AbstractFunctionCallExpression expr, IVariableTypeEnvironment env, JobGenContext context) throws AlgebricksException { FunctionIdentifier fnId = expr.getFunctionIdentifier(); IFunctionDescriptor fd = functionManager.lookupFunction(fnId); fd.setSourceLocation(expr.getSourceLocation()); IFunctionTypeInferer fnTypeInfer = functionManager.lookupFunctionTypeInferer(fnId); if (fnTypeInfer != null) { CompilerProperties compilerProps = ((IApplicationContext) context.getAppContext()).getCompilerProperties(); fnTypeInfer.infer(expr, fd, env, compilerProps); } return fd; } }
protected IFunctionDescriptor createCastFunction(boolean strictCast) throws AlgebricksException { IFunctionDescriptor castFuncDesc = metadataProvider.getFunctionManager() .lookupFunction(strictCast ? BuiltinFunctions.CAST_TYPE : BuiltinFunctions.CAST_TYPE_LAX); castFuncDesc.setSourceLocation(sourceLoc); castFuncDesc.setImmutableStates(enforcedItemType, itemType); return castFuncDesc; }
IFunctionDescriptor fDesc = functionManager.lookupFunction(BuiltinFunctions.FIELD_ACCESS_BY_INDEX); fDesc.setSourceLocation(sourceLoc); fDesc.setImmutableStates(recType); IFunctionDescriptor fDesc = functionManager.lookupFunction(BuiltinFunctions.FIELD_ACCESS_BY_NAME); fDesc.setSourceLocation(sourceLoc); return fDesc.createEvaluatorFactory( IFunctionDescriptor fDesc = functionManager.lookupFunction(BuiltinFunctions.FIELD_ACCESS_NESTED); fDesc.setSourceLocation(sourceLoc); fDesc.setImmutableStates(recType, fldName);
IFunctionDescriptor fDesc = functionManager.lookupFunction(BuiltinFunctions.FIELD_ACCESS_BY_INDEX); fDesc.setSourceLocation(sourceLoc); fDesc.setImmutableStates(recType); throw new AlgebricksException(e); IFunctionDescriptor fDesc = functionManager.lookupFunction(BuiltinFunctions.FIELD_ACCESS_NESTED); fDesc.setSourceLocation(sourceLoc); fDesc.setImmutableStates(recType, fldName);