Package io.crate.exceptions

Examples of io.crate.exceptions.ColumnUnknownException


    public DynamicReference getDynamic(ColumnIdent ident) {
        if (!ident.isColumn()) {
            ColumnIdent parentIdent = ident.getParent();
            ReferenceInfo parentInfo = getReferenceInfo(parentIdent);
            if (parentInfo != null && parentInfo.columnPolicy() == ColumnPolicy.STRICT) {
                throw new ColumnUnknownException(ident().name(), ident.fqn());
            }
        }
        return new DynamicReference(new ReferenceIdent(ident(), ident), rowGranularity());
    }
View Full Code Here


            }

            if (parentInfo != null) {
                switch (parentInfo.columnPolicy()) {
                    case STRICT:
                        throw new ColumnUnknownException(ident().name(), ident.fqn());
                    case IGNORED:
                        parentIsIgnored = true;
                        break;
                }
            }
        } else if(forWrite == false && columnPolicy() != ColumnPolicy.IGNORED) {
            throw new ColumnUnknownException(ident().name(), ident.fqn());
        } else {
            switch (columnPolicy()) {
                case STRICT:
                    throw new ColumnUnknownException(ident().name(), ident.fqn());
                case IGNORED:
                    parentIsIgnored = true;
                    break;
                default:
                    break;
View Full Code Here

    }

    private void validatePrimaryKeys() {
        for (String additionalPrimaryKey : additionalPrimaryKeys) {
            if (!columnIdents.contains(ColumnIdent.fromPath(additionalPrimaryKey))) {
                throw new ColumnUnknownException(additionalPrimaryKey);
            }
        }
    }
View Full Code Here

    private void validateIndexDefinitions() {
        for (Map.Entry<String, Set<String>> entry : copyToMap.entrySet()) {
            ColumnIdent columnIdent = ColumnIdent.fromPath(entry.getKey());
            if (!columnIdents.contains(columnIdent)) {
                throw new ColumnUnknownException(columnIdent.sqlFqn());
            }
            if (!columnTypes.get(columnIdent).equalsIgnoreCase("string")) {
                throw new IllegalArgumentException("INDEX definition only support 'string' typed source columns");
            }
        }
View Full Code Here

        AnalyzedColumnDefinition columnDefinition = columnDefinitionByIdent(partitionedByIdent, true);
        if (columnDefinition == null) {
            if (skipIfNotFound) {
                return;
            }
            throw new ColumnUnknownException(partitionedByIdent.sqlFqn());
        }
        if (columnDefinition.dataType().equals("object")) {
            throw new IllegalArgumentException(String.format(Locale.ENGLISH,
                    "Cannot use object column '%s' in PARTITIONED BY clause",
                    columnDefinition.ident().sqlFqn()));
View Full Code Here

TOP

Related Classes of io.crate.exceptions.ColumnUnknownException

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.