Package com.foundationdb.qp.row

Examples of com.foundationdb.qp.row.Row.rowType()


    protected Row next() {
        Row row = cursor.next();
        if ((row != null) &&
                (row.rowType() != innerRowType)) {
            throw new IllegalArgumentException("wrong row type: " + innerRowType +
                    " != " + row.rowType());
        }
        return row;
    }

    SubqueryTEvaluateble(Operator subquery, RowType outerRowType, RowType innerRowType, int bindingPosition,
View Full Code Here


                    checkOnlineError(session, schemaManager);
                    checkOnlineError = false;
                }
                if(row != null) {
                    rowCount++;
                    RowType rowType = row.rowType();
                    // No way to pre-populate this map as Operator#rowType() is optional and insufficient.
                    HKeyChecker checker = checkers.get(rowType);
                    if(checker == null) {
                        if(rowType.hasTable()) {
                            checker = new SchemaManagerChecker(rowType.table().getTableId());
View Full Code Here

                        if(rowType.hasTable()) {
                            checker = new SchemaManagerChecker(rowType.table().getTableId());
                        } else {
                            checker = new FalseChecker();
                        }
                        checkers.put(row.rowType(), checker);
                    }
                    try {
                        if(handler != null) {
                            //TODO: Not correct but only option for createAs due to hidden PK
                            Key hKey = new Key (null, 2047);
View Full Code Here

        try {
            boolean done = false;
            while(!done) {
                Row row = cursor.next();
                if(row != null) {
                    RowType rowType = row.rowType();
                    HKeyChecker checker = checkers.get(rowType);
                    if (checker == null) {
                        if (rowType.hasTable()) {
                            checker = new SchemaManagerChecker(rowType.table().getTableId());
                        } else {
View Full Code Here

                        if (rowType.hasTable()) {
                            checker = new SchemaManagerChecker(rowType.table().getTableId());
                        } else {
                            checker = new FalseChecker();
                        }
                        checkers.put(row.rowType(), checker);
                    }
                } else {
                    done = true;
                }
            }
View Full Code Here

        int rowCount = 0;
        Iterator<? extends Row> expectedsIter = expecteds.iterator();
        for (Row actual : actuals) {
            Row expected = expectedsIter.next();
            int actualWidth = actual.rowType().nFields();
            assertEquals("row width", expected.rowType().nFields(), actualWidth);
            for (int i = 0; i < actualWidth; ++i) {
                checkRowInstance(expected, actual, i, rowCount, actuals, expecteds);
            }
            if (additionalCheck != null)
                additionalCheck.check(actual);
View Full Code Here

        while((row = scan.next()) != null) {
            if(rowIndex == expectedRows.length) {
                fail("More actual rows than expected");
            }
            assertEquals("Expected column count, row " + rowIndex,
                         expectedRows[rowIndex].length, row.rowType().nFields());

            for(int colIndex = 0; colIndex < expectedRows[rowIndex].length; ++colIndex) {
                final String msg = "row " + rowIndex + ", col " + colIndex;
                final Object expected = expectedRows[rowIndex][colIndex];
                final ValueSource actual = row.value(colIndex);
View Full Code Here

                final String msg = "row " + rowIndex + ", col " + colIndex;
                final Object expected = expectedRows[rowIndex][colIndex];
                final ValueSource actual = row.value(colIndex);
               
                if(expected == null || actual.isNull()) {
                    Column column = row.rowType().table().getColumn(colIndex);
                    if(!Boolean.TRUE.equals(column.getNullable())) {
                        fail(String.format("Expected (%s) or actual (%s) NULL for column (%s) declared NOT NULL",
                                           expected, actual, column));
                    }
                }
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.