Package io.crate.operation

Examples of io.crate.operation.Input


        @Override
        public SortField visitFunction(final Function function, final SortSymbolContext context) {
            CollectInputSymbolVisitor.Context inputContext = inputSymbolVisitor.process(function);
            ArrayList<Input<?>> inputs = inputContext.topLevelInputs();
            assert inputs.size() == 1;
            final Input functionInput = inputs.get(0);
            @SuppressWarnings("unchecked")
            final List<LuceneCollectorExpression> expressions = inputContext.docLevelExpressions();
            final SortField.Type type = luceneTypeMap.get(function.valueType());
            final SortOrder sortOrder = new SortOrder(context.reverseFlag, context.nullFirst);
            assert type != null : "Could not get lucene sort type for " + function.valueType();
View Full Code Here


        assertNull(v.get("something"));
        assertEquals(1D, v.get("1"));
        assertEquals(5D, v.get("5"));
        assertEquals(15D, v.get("15"));

        Input ci = load.getChildImplementation("1");
        assertEquals(1D, ci.value());
        ci = load.getChildImplementation("5");
        assertEquals(5D, ci.value());
        ci = load.getChildImplementation("15");
        assertEquals(15D, ci.value());
    }
View Full Code Here

    public void testChildImplementationLookup() throws Exception {
        ReferenceIdent ident = new ReferenceIdent(SysNodesTableInfo.IDENT, "load");
        SysObjectReference load = (SysObjectReference) resolver.getImplementation(ident);
        assertEquals(LOAD_INFO, load.info());

        Input ci = load.getChildImplementation("1");
        assertEquals(1D, ci.value());

        ident = LOAD1_INFO.ident();
        SysExpression<Double> l1 = (SysExpression<Double>) resolver.getImplementation(ident);
        assertEquals(LOAD1_INFO, l1.info());
    }
View Full Code Here

        @Override
        public Object extract(final GetResponse response) {
            Input[] inputs = new Input[subExtractors.size()];
            int idx = 0;
            for (final FieldExtractor subExtractor : subExtractors) {
                inputs[idx] = new Input() {
                    @Override
                    public Object value() {
                        return subExtractor.extract(response);
                    }
                };
View Full Code Here

TOP

Related Classes of io.crate.operation.Input

Copyright © 2018 www.massapicom. 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.