Package io.crate.types

Examples of io.crate.types.ArrayType.innerType()


        public FunctionImplementation<Function> getForTypes(List<DataType> dataTypes) throws IllegalArgumentException {
            Preconditions.checkArgument(dataTypes.size() == 1, "Invalid number of arguments");
            Preconditions.checkArgument(DataTypes.isCollectionType(dataTypes.get(0)), "Argument must be a collection type");
            ArrayType arrayType = (ArrayType) dataTypes.get(0);
            // TODO: support geo inner types
            Preconditions.checkArgument(DataTypes.PRIMITIVE_TYPES.contains(arrayType.innerType()),
                    String.format(Locale.ENGLISH, "Array inner type '%s' not supported for conversion",
                            arrayType.innerType().getName()));
            return new ToStringArrayFunction(createInfo(dataTypes));
        }
    }
View Full Code Here


            Preconditions.checkArgument(DataTypes.isCollectionType(dataTypes.get(0)), "Argument must be a collection type");
            ArrayType arrayType = (ArrayType) dataTypes.get(0);
            // TODO: support geo inner types
            Preconditions.checkArgument(DataTypes.PRIMITIVE_TYPES.contains(arrayType.innerType()),
                    String.format(Locale.ENGLISH, "Array inner type '%s' not supported for conversion",
                            arrayType.innerType().getName()));
            return new ToStringArrayFunction(createInfo(dataTypes));
        }
    }
}
View Full Code Here

    protected static void checkPreconditions(List<DataType> dataTypes) throws IllegalArgumentException {
        Preconditions.checkArgument(dataTypes.size() == 1, "Invalid number of arguments");
        Preconditions.checkArgument(dataTypes.get(0) instanceof ArrayType, "Argument must be an array type");
        ArrayType arrayType = (ArrayType) dataTypes.get(0);
        Preconditions.checkArgument(DataTypes.PRIMITIVE_TYPES.contains(arrayType.innerType()),
                String.format(Locale.ENGLISH, "Array inner type '%s' not supported for conversion",
                        arrayType.innerType().getName()));
    }

    @Override
View Full Code Here

        Preconditions.checkArgument(dataTypes.size() == 1, "Invalid number of arguments");
        Preconditions.checkArgument(dataTypes.get(0) instanceof ArrayType, "Argument must be an array type");
        ArrayType arrayType = (ArrayType) dataTypes.get(0);
        Preconditions.checkArgument(DataTypes.PRIMITIVE_TYPES.contains(arrayType.innerType()),
                String.format(Locale.ENGLISH, "Array inner type '%s' not supported for conversion",
                        arrayType.innerType().getName()));
    }

    @Override
    public FunctionInfo info() {
        return info;
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.