Package io.crate.metadata

Examples of io.crate.metadata.FunctionInfo


    private final FunctionInfo info;

    public static void register(AggregationImplModule mod) {
        for (DataType t : DataTypes.PRIMITIVE_TYPES) {
            mod.register(new ArbitraryAggregation(
                    new FunctionInfo(new FunctionIdent(NAME, ImmutableList.of(t)), t, FunctionInfo.Type.AGGREGATE))
            );
        }
    }
View Full Code Here


        for (final DataType dataType : DataTypes.PRIMITIVE_TYPES) {
            final Streamer<?> setStreamer = new SetType(dataType).streamer();

            mod.register(
                    new CollectSetAggregation(
                            new FunctionInfo(new FunctionIdent(NAME,
                                    ImmutableList.of(dataType)),
                                    dataType, FunctionInfo.Type.AGGREGATE
                            )
                    ) {
                        @Override
View Full Code Here

    public static void register(AggregationImplModule mod) {
        for (final DataType dataType : DataTypes.PRIMITIVE_TYPES) {
            mod.register(
                    new MinimumAggregation(
                            new FunctionInfo(new FunctionIdent(NAME,
                                    ImmutableList.of(dataType)), dataType, FunctionInfo.Type.AGGREGATE)
                    ) {
                        @Override
                        public MinimumAggState newState() {
                            return new MinimumAggState() {
View Full Code Here

        return toStep;
    }

    @Override
    public void readFrom(StreamInput in) throws IOException {
        functionInfo = new FunctionInfo();
        functionInfo.readFrom(in);

        fromStep = Step.readFrom(in);
        toStep = Step.readFrom(in);
View Full Code Here

        return visitor.visitFunction(this, context);
    }

    @Override
    public void readFrom(StreamInput in) throws IOException {
        info = new FunctionInfo();
        info.readFrom(in);

        int numArguments = in.readVInt();
        arguments = new ArrayList<>(numArguments);
        for (int i = 0; i < numArguments; i++) {
View Full Code Here

     * 2. query string - string
     * 3. match_type - string (nullable)
     * 4. match_type options - object mapping option name to value (Object) (nullable)
     */
    public static void register(PredicateModule module) {
        module.register(new MatchPredicate(new FunctionInfo(IDENT, DataTypes.BOOLEAN, FunctionInfo.Type.PREDICATE)));
    }
View Full Code Here

    private static class Resolver implements DynamicFunctionResolver {

        @Override
        public FunctionImplementation<Function> getForTypes(List<DataType> dataTypes) throws IllegalArgumentException {
            ToPrimitiveFunction.checkPreconditions(dataTypes);
            return new ToBooleanFunction(new FunctionInfo(new FunctionIdent(NAME, dataTypes), DataTypes.BOOLEAN));
        }
View Full Code Here

    private static class Resolver implements DynamicFunctionResolver {

        @Override
        public FunctionImplementation<Function> getForTypes(List<DataType> dataTypes) throws IllegalArgumentException {
            ToPrimitiveFunction.checkPreconditions(dataTypes);
            return new ToLongFunction(new FunctionInfo(new FunctionIdent(NAME, dataTypes), DataTypes.LONG));
        }
View Full Code Here

    private static class Resolver implements DynamicFunctionResolver {

        @Override
        public FunctionImplementation<Function> getForTypes(List<DataType> dataTypes) throws IllegalArgumentException {
            ToPrimitiveFunction.checkPreconditions(dataTypes);
            return new ToDoubleFunction(new FunctionInfo(new FunctionIdent(NAME, dataTypes), DataTypes.DOUBLE));
        }
View Full Code Here

    private static class Resolver implements DynamicFunctionResolver {

        @Override
        public FunctionImplementation<Function> getForTypes(List<DataType> dataTypes) throws IllegalArgumentException {
            ToPrimitiveFunction.checkPreconditions(dataTypes);
            return new ToTimestampFunction(new FunctionInfo(new FunctionIdent(NAME, dataTypes), DataTypes.TIMESTAMP));
        }
View Full Code Here

TOP

Related Classes of io.crate.metadata.FunctionInfo

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.