Examples of FunctionResolver


Examples of com.opengamma.engine.function.resolver.FunctionResolver

    };
    functionRepository.addFunction(mockFunction);
    final FunctionCompilationContext compilationContext = new FunctionCompilationContext();
    final CompiledFunctionService compilationService = new CompiledFunctionService(functionRepository, new CachingFunctionRepositoryCompiler(), compilationContext);
    compilationService.initialize();
    final FunctionResolver functionResolver = new DefaultFunctionResolver(compilationService);
    final InMemorySecuritySource securitySource = new InMemorySecuritySource();
    final MockPositionSource positionSource = new MockPositionSource();
    compilationContext.setRawComputationTargetResolver(new DefaultComputationTargetResolver(securitySource, positionSource));
    final ViewComputationCacheSource computationCacheSource = new InMemoryViewComputationCacheSource(FudgeContext.GLOBAL_DEFAULT);
    final FunctionInvocationStatisticsGatherer functionInvocationStatistics = new DiscardingInvocationStatisticsGatherer();
View Full Code Here

Examples of com.opengamma.engine.function.resolver.FunctionResolver

    repo.registerComponent(infoCFS, compiledFunctionService);
    final ComponentInfo infoFR = new ComponentInfo(FunctionRepository.class, getClassifier());
    repo.registerComponent(infoFR, compiledFunctionService.getFunctionRepository());
    final FunctionExclusionGroups functionExclusionGroups = appContext.getBean(FunctionExclusionGroups.class);
    repo.registerComponent(new ComponentInfo(FunctionExclusionGroups.class, getClassifier()), functionExclusionGroups);
    final FunctionResolver functionResolver = appContext.getBean(FunctionResolver.class);
    repo.registerComponent(new ComponentInfo(FunctionResolver.class, getClassifier()), functionResolver);
    if (isPublishRest()) {
      repo.getRestComponents().publishResource(new DataFunctionRepositoryResource(compiledFunctionService.getFunctionRepository()));
    }
  }
View Full Code Here

Examples of com.opengamma.engine.function.resolver.FunctionResolver

    //dependencyGraphBuilder.setTargetDigests(new FinancialSecurityTargetDigests());
  }

  private ViewCompilationServices createViewCompilationServices() {
    final CompiledFunctionService cfs = _repo.getInstance(CompiledFunctionService.class, "main");
    final FunctionResolver functionResolver = _repo.getInstance(FunctionResolver.class, "main");
    final FunctionExclusionGroups functionExclusionGroups = _repo.getInstance(FunctionExclusionGroups.class, "main");
    final DependencyGraphBuilderFactory dependencyGraphBuilder = new DependencyGraphBuilderFactory();
    dependencyGraphBuilder.setFunctionExclusionGroups(functionExclusionGroups);
    configureDependencyGraphBuilder(dependencyGraphBuilder);
    final MarketDataAvailabilityProvider mdap = new OptimisticMarketDataAvailabilityFilter().withProvider(new DefaultMarketDataAvailabilityProvider());
View Full Code Here

Examples of com.opengamma.engine.function.resolver.FunctionResolver

  }

  private CompiledFunctionResolver createFunctionResolver(final FunctionCompilationContext ctx) {
    final CompiledFunctionService cfs = new CompiledFunctionService(createFunctionRepository(), new CachingFunctionRepositoryCompiler(), ctx);
    cfs.initialize();
    final FunctionResolver resolver = new DefaultFunctionResolver(cfs, createPrioritizer());
    return resolver.compile(Instant.now());
  }
View Full Code Here

Examples of com.volantis.styling.compiler.FunctionResolver

        matcherConfiguration.setBuilderContext(builderContext);

        matcherBuilder = new MatcherBuilderImpl(matcherConfiguration);

        // Create a value compiler that will be used to compile all the values.
        FunctionResolver resolver = ((CompilerConfigurationImpl) configuration)
                .getResolver();
        ValueCompiler valueCompiler = new ValueCompilerImpl(resolver);

        // Create an
        splitter = new PropertySplitterImpl(valueCompiler);
View Full Code Here

Examples of com.volantis.styling.compiler.FunctionResolver

    // Javadoc inherited.
    public StylingFunction resolve(String name) {
        StylingFunction function = null;
        for (int i = 0; i < resolvers.length; i++) {
            FunctionResolver resolver = resolvers[i];
            function = resolver.resolve(name);
            if (function != null) {
                return function;
            }
        }
View Full Code Here

Examples of org.apache.drill.exec.resolver.FunctionResolver

        castArgs.add(new ValueExpressions.LongExpression(fromExpr.getMajorType().getPrecision(), null));
        castArgs.add(new ValueExpressions.LongExpression(fromExpr.getMajorType().getScale(), null));
      }

      FunctionCall castCall = new FunctionCall(castFuncName, castArgs, ExpressionPosition.UNKNOWN);
      FunctionResolver resolver = FunctionResolverFactory.getResolver(castCall);
      DrillFuncHolder matchedCastFuncHolder = registry.findDrillFunction(resolver, castCall);

      if (matchedCastFuncHolder == null) {
        logFunctionResolutionError(errorCollector, castCall);
        return NullExpression.INSTANCE;
View Full Code Here

Examples of org.apache.drill.exec.resolver.FunctionResolver

      }

      //replace with a new function call, since its argument could be changed.
      call = new FunctionCall(call.getName(), args, call.getPosition());

      FunctionResolver resolver = FunctionResolverFactory.getResolver(call);
      DrillFuncHolder matchedFuncHolder = registry.findDrillFunction(resolver, call);

      if (matchedFuncHolder instanceof DrillComplexWriterFuncHolder && ! allowComplexWriter) {
        errorCollector.addGeneralError(call.getPosition(), "Only ProjectRecordBatch could have complex writer function. You are using complex writer function " + call.getName() + " in a non-project operation!");
      }
View Full Code Here

Examples of org.apache.drill.exec.resolver.FunctionResolver

    private LogicalExpression getConvertToNullableExpr(List<LogicalExpression> args, MinorType minorType,
        FunctionImplementationRegistry registry) {
      String funcName = "convertToNullable" + minorType.toString();
      FunctionCall funcCall = new FunctionCall(funcName, args, ExpressionPosition.UNKNOWN);
      FunctionResolver resolver = FunctionResolverFactory.getResolver(funcCall);

      DrillFuncHolder matchedConvertToNullableFuncHolder = registry.findDrillFunction(resolver, funcCall);

      if (matchedConvertToNullableFuncHolder == null) {
        logFunctionResolutionError(errorCollector, funcCall);
View Full Code Here

Examples of org.apache.drill.exec.resolver.FunctionResolver

    FunctionCall call = new FunctionCall(
        "hash",
        args,
        ExpressionPosition.UNKNOWN
    );
    FunctionResolver resolver = FunctionResolverFactory.getResolver(call);
    DrillFuncHolder matchedFuncHolder = registry.findDrillFunction(resolver, call);
    assertEquals( expectedBestInputMode, matchedFuncHolder.getParmMajorType(0).getMode());
  }
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.