Examples of resolveFunction()


Examples of com.facebook.presto.metadata.FunctionRegistry.resolveFunction()

        FunctionRegistry registry = context.getRegistry();

        FunctionInfo function = registry.getExactFunction(signature);
        if (function == null) {
            // TODO: temporary hack to deal with magic timestamp literal functions which don't have an "exact" form and need to be "resolved"
            function = registry.resolveFunction(QualifiedName.of(signature.getName()), signature.getArgumentTypes(), false);
        }

        Preconditions.checkArgument(function != null, "Function %s not found", signature);

        List<ByteCodeNode> argumentsByteCode = new ArrayList<>();
View Full Code Here

Examples of com.facebook.presto.metadata.MetadataManager.resolveFunction()

    @Test
    public void testHashAggregation()
            throws Exception
    {
        MetadataManager metadata = new MetadataManager();
        InternalAggregationFunction countVarcharColumn = metadata.resolveFunction(QualifiedName.of("count"), ImmutableList.of(StandardTypes.VARCHAR), false).getAggregationFunction();
        InternalAggregationFunction countBooleanColumn = metadata.resolveFunction(QualifiedName.of("count"), ImmutableList.of(StandardTypes.BOOLEAN), false).getAggregationFunction();
        List<Page> input = rowPagesBuilder(VARCHAR, VARCHAR, VARCHAR, BIGINT, BOOLEAN)
                .addSequencePage(10, 100, 0, 100, 0, 500)
                .addSequencePage(10, 100, 0, 200, 0, 500)
                .addSequencePage(10, 100, 0, 300, 0, 500)
View Full Code Here

Examples of com.facebook.presto.metadata.MetadataManager.resolveFunction()

    public void testHashAggregation()
            throws Exception
    {
        MetadataManager metadata = new MetadataManager();
        InternalAggregationFunction countVarcharColumn = metadata.resolveFunction(QualifiedName.of("count"), ImmutableList.of(StandardTypes.VARCHAR), false).getAggregationFunction();
        InternalAggregationFunction countBooleanColumn = metadata.resolveFunction(QualifiedName.of("count"), ImmutableList.of(StandardTypes.BOOLEAN), false).getAggregationFunction();
        List<Page> input = rowPagesBuilder(VARCHAR, VARCHAR, VARCHAR, BIGINT, BOOLEAN)
                .addSequencePage(10, 100, 0, 100, 0, 500)
                .addSequencePage(10, 100, 0, 200, 0, 500)
                .addSequencePage(10, 100, 0, 300, 0, 500)
                .build();
View Full Code Here

Examples of com.facebook.presto.metadata.MetadataManager.resolveFunction()

    @Test
    public void testAggregation()
            throws Exception
    {
        MetadataManager metadata = new MetadataManager();
        InternalAggregationFunction countVarcharColumn = metadata.resolveFunction(QualifiedName.of("count"), ImmutableList.of(StandardTypes.VARCHAR), false).getAggregationFunction();
        List<Page> input = rowPagesBuilder(VARCHAR, BIGINT, VARCHAR, BIGINT, DOUBLE, VARCHAR)
                .addSequencePage(100, 0, 0, 300, 500, 500, 500)
                .build();

        OperatorFactory operatorFactory = new AggregationOperatorFactory(
View Full Code Here

Examples of com.indeed.proctor.common.el.LibraryFunctionMapper.resolveFunction()

    @Test
    public void testConstruction() {
        final Map<String, Class<?>> libraryClasses = Maps.newHashMap();
        libraryClasses.put("tlfm", TestLibraryFunctionMapper.class);
        final LibraryFunctionMapper mapper = new LibraryFunctionMapper(libraryClasses);
        final Method foundMe = mapper.resolveFunction("tlfm", "findMe");
        assertNotNull(foundMe);
        final Method foundMeToo = mapper.resolveFunction("tlfm", "findMeToo");
        assertNotNull(foundMeToo);
    }
}
View Full Code Here

Examples of com.indeed.proctor.common.el.LibraryFunctionMapper.resolveFunction()

        final Map<String, Class<?>> libraryClasses = Maps.newHashMap();
        libraryClasses.put("tlfm", TestLibraryFunctionMapper.class);
        final LibraryFunctionMapper mapper = new LibraryFunctionMapper(libraryClasses);
        final Method foundMe = mapper.resolveFunction("tlfm", "findMe");
        assertNotNull(foundMe);
        final Method foundMeToo = mapper.resolveFunction("tlfm", "findMeToo");
        assertNotNull(foundMeToo);
    }
}
View Full Code Here

Examples of javax.el.FunctionMapper.resolveFunction()

       
        // quickly validate again for this request
        if (fnMapper == null) {
            throw new ELException(MessageFactory.get("error.fnMapper.null"));
        }
        Method m = fnMapper.resolveFunction(this.prefix, this.localName);
        if (m == null) {
            throw new ELException(MessageFactory.get("error.fnMapper.method",
                    this.getOutputName()));
        }
        return m.getReturnType();
View Full Code Here

Examples of javax.el.FunctionMapper.resolveFunction()

       
        // quickly validate again for this request
        if (fnMapper == null) {
            throw new ELException(MessageFactory.get("error.fnMapper.null"));
        }
        Method m = fnMapper.resolveFunction(this.prefix, this.localName);
        if (m == null) {
            throw new ELException(MessageFactory.get("error.fnMapper.method",
                    this.getOutputName()));
        }
       
View Full Code Here

Examples of javax.el.FunctionMapper.resolveFunction()

       
        // quickly validate again for this request
        if (fnMapper == null) {
            throw new ELException(MessageFactory.get("error.fnMapper.null"));
        }
        Method m = fnMapper.resolveFunction(this.prefix, this.localName);
        if (m == null) {
            throw new ELException(MessageFactory.get("error.fnMapper.method",
                    this.getOutputName()));
        }
        return m.getReturnType();
View Full Code Here

Examples of javax.el.FunctionMapper.resolveFunction()

       
        // quickly validate again for this request
        if (fnMapper == null) {
            throw new ELException(MessageFactory.get("error.fnMapper.null"));
        }
        Method m = fnMapper.resolveFunction(this.prefix, this.localName);
        if (m == null) {
            throw new ELException(MessageFactory.get("error.fnMapper.method",
                    this.getOutputName()));
        }
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.