Package com.foundationdb.qp.rowtype

Examples of com.foundationdb.qp.rowtype.RowType.table()


                Ordering ordering = API.ordering();
                for(int i = 0; i < expList.size(); ++i) {
                    TPreparedExpression prep = expList.get(i).getTPreparedExpression();
                    ordering.append(ExpressionGenerators.field(prep.resultType(), i), true);
                }
                Operator plan = API.groupScan_Default(tType.table().getGroup());
                plan = API.project_Default(plan, expList, tType);
                plan = API.sort_General(plan, plan.rowType(), ordering, SortOption.PRESERVE_DUPLICATES);
                return plan;
            }
        });
View Full Code Here


        Row[] expected = {
            new TestRow(t1Type, r1),
            new TestRow(t1Type, r2)
        };
        compareRows(expected, adapter.newGroupCursor(t1Type.table().getGroup()));

        txnService().commitTransaction(session());
    }
   
    @Test
View Full Code Here

                        testRow(iType, 100, 10, 110),
                        testRow(iType, 101, 10, 111),
                        testRow(iType, 111, 11, 122),
                        testRow(iType, 300, 30, 330)
                },
                adapter.newGroupCursor(iType.table().getGroup())
        );
    }

    @Test
    public void cannotAddNotNullWithNoDefault() throws StandardException {
View Full Code Here

                new Row[] {
                        testRow(oType, 10, 1, "a"),
                        testRow(oType, 11, 1, "b"),
                        testRow(oType, 60, 6, "c"),
                },
                adapter.newGroupCursor(oType.table().getGroup())
        );
    }

    @Test
    public void addGroupingForeignKeyToExistingParent() throws StandardException {
View Full Code Here

            // is from an index. I.e., this operator can be used for an index lookup.
            for (RowType ancestorType : ancestorTypes) {
                ArgumentValidation.isTrue("ancestorType.ancestorOf(tableRowType)",
                                          ancestorType.ancestorOf(tableRowType));
                ArgumentValidation.isTrue("ancestorType.table().getGroup() == tableRowType.table().getGroup()",
                                          ancestorType.table().getGroup() == tableRowType.table().getGroup());
            }
        } else if (rowType instanceof TableRowType) {
            // Each ancestorType must be an ancestor of rowType. ancestorType = tableRowType is OK only if the input
            // is from an index. I.e., this operator can be used for an index lookup.
            for (RowType ancestorType : ancestorTypes) {
View Full Code Here

        RowType innerRowType = hashedRowTypes[columnCount -2];
        RowType outerRowType = emptyTableRowType;
        // filterInput loads the filter with F rows containing the given testId.
        Operator innerStream = new TimeOperator(groupScan_Default(innerRowType.table().getGroup()));

        Operator outerStream = groupScan_Default(outerRowType.table().getGroup());

        // For the  index scan retrieving rows from the F(x) index given a D index row

        // Use a bloom filter loaded by filterInput. Then for each input row, check the filter (projecting
        // D rows on (x)), and, for positives, check F using an index scan keyed by D.x.
View Full Code Here

        RowType innerRowType = hashedRowTypes[columnCount - 2];
        RowType outerRowType = drivingRowTypes[columnCount -2];
        // filterInput loads the filter with F rows containing the given testId.
        Operator innerStream = groupScan_Default(innerRowType.table().getGroup());

        Operator outerStream = groupScan_Default(outerRowType.table().getGroup());
        int joinFields[] = new int[joinColumns];
        for(int i = 0;  i <joinColumns; i++) {
            joinFields[i] = i;
        }
        return hashJoinPlan(outerRowType, innerRowType, outerStream, innerStream, joinFields, joinFields);
View Full Code Here

                Row row = cursor.next();
                if (row == null) {
                    break;
                }
                RowType rowType = row.rowType();
                Table rowTable = rowType.table();
                int size = tableSize(rowTable);
                if (size < 0)
                    continue;
                try {
                    formatter.appendRow(rowType, row, size);
View Full Code Here

        Row[] expected = {
            new TestRow(t1Type, r1),
            new TestRow(t1Type, r2)
        };
        compareRows(expected, adapter.newGroupCursor(t1Type.table().getGroup()));

        txnService().commitTransaction(session());
    }
   
}
View Full Code Here

                    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());
                        } else {
                            checker = new FalseChecker();
                        }
                        checkers.put(row.rowType(), checker);
                    }
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.