Package io.crate.operation.aggregation

Examples of io.crate.operation.aggregation.AggregationState.writeTo()


        FunctionIdent fi = new FunctionIdent("collect_set", ImmutableList.<DataType>of(DataTypes.LONG));
        AggregationFunction impl = (AggregationFunction) functions.get(fi);
        AggregationState state = impl.newState();

        BytesStreamOutput streamOutput = new BytesStreamOutput();
        state.writeTo(streamOutput);

        AggregationState newState = impl.newState();
        newState.readFrom(new BytesStreamInput(streamOutput.bytes()));
        assertEquals(state.value(), newState.value());
    }
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.