Package io.crate.metadata

Examples of io.crate.metadata.FunctionInfo


    private static class Resolver implements DynamicFunctionResolver {

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


        @Override
        public FunctionImplementation<Function> getForTypes(List<DataType> dataTypes) throws IllegalArgumentException {
            // TODO: add support for geo types
            ToPrimitiveFunction.checkPreconditions(dataTypes);
            return new ToStringFunction(new FunctionInfo(new FunctionIdent(NAME, dataTypes), DataTypes.STRING));
        }
View Full Code Here

    private static class Resolver implements DynamicFunctionResolver {

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

    private static class Resolver implements DynamicFunctionResolver {

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

    private static class Resolver implements DynamicFunctionResolver {

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

    private static class Resolver implements DynamicFunctionResolver {

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

        if (functionName == null) {
            throw new IllegalArgumentException(
                    String.format(Locale.ENGLISH, "No cast function found for return type %s",
                            returnType.getName()));
        }
        return new FunctionInfo(new FunctionIdent(functionName, ImmutableList.of(dataType)), returnType);
    }
View Full Code Here

    public static final String NAME = "toStringArray";
    public static final DataType ARRAY_STRING_TYPE = new ArrayType(DataTypes.STRING);

    private static FunctionInfo createInfo(List<DataType> types) {
        return new FunctionInfo(new FunctionIdent(NAME, types), ARRAY_STRING_TYPE);
    }
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 ToFloatFunction(new FunctionInfo(new FunctionIdent(NAME, dataTypes), DataTypes.FLOAT));
        }
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 ToByteFunction(new FunctionInfo(new FunctionIdent(NAME, dataTypes), DataTypes.BYTE));
        }
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.