Examples of innerType()


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

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

            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

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

    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

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

        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

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

                    return null;
                }
                String field = tuple.v1().info().ident().columnIdent().fqn();
                Literal literal = tuple.v2();
                CollectionType dataType = ((CollectionType) literal.valueType());
                QueryBuilderHelper builder = QueryBuilderHelper.forType(dataType.innerType());
                BooleanQuery booleanQuery = new BooleanQuery();
                Set values = (Set) literal.value();
                for (Object value : values) {
                    booleanQuery.add(builder.eq(field, value), BooleanClause.Occur.SHOULD);
                }
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.