Examples of tableRowType()


Examples of com.foundationdb.qp.rowtype.Schema.tableRowType()

        runAlter(ChangeLevel.TABLE, "ALTER TABLE c ADD COLUMN n INT DEFAULT 0");

        writeRows(row(cid, "e", 3));

        Schema schema = SchemaCache.globalSchema(ddl().getAIS(session()));
        TableRowType cType = schema.tableRowType(getTable(SCHEMA, C_TABLE));
        StoreAdapter adapter = newStoreAdapter(schema);
        long pk = 1L;
        compareRows(
                new Row[]{
                        testRow(cType, "a", 0, pk++),
View Full Code Here

Examples of com.foundationdb.qp.rowtype.Schema.tableRowType()

        runAlter(ChangeLevel.GROUP, "ALTER TABLE c DROP COLUMN n");

        writeRows(row(cid, "e"));

        Schema schema = SchemaCache.globalSchema(ddl().getAIS(session()));
        TableRowType cType = schema.tableRowType(getTable(SCHEMA, C_TABLE));
        StoreAdapter adapter = newStoreAdapter(schema);
        long pk = 1L;
        compareRows(
                new Row[]{
                        testRow(cType, "a", pk++),
View Full Code Here

Examples of com.foundationdb.qp.rowtype.Schema.tableRowType()

        return new TestRow(type, fields);
    }

    protected void compareRows(Object[][] expected, Table table) {
        Schema schema = SchemaCache.globalSchema(ais());
        TableRowType rowType = schema.tableRowType(table);
        Row[] rows = new Row[expected.length];
        for (int i = 0; i < expected.length; i++) {
            rows[i] = new TestRow(rowType, expected[i]);
        }
       
View Full Code Here

Examples of com.foundationdb.qp.rowtype.Schema.tableRowType()

        createFromDDL(SCHEMA,
          "CREATE TABLE t1(id INT PRIMARY KEY NOT NULL, s VARCHAR(128)) STORAGE_FORMAT protobuf");
        int t1 = ddl().getTableId(session(), new TableName(SCHEMA, "t1"));

        Schema schema = SchemaCache.globalSchema(ddl().getAIS(session()));
        RowType t1Type = schema.tableRowType(getTable(t1));
        StoreAdapter adapter = newStoreAdapter(schema);

        txnService().beginTransaction(session());

        Object[] r1 = { 1L, "Fred" };
View Full Code Here

Examples of com.foundationdb.qp.rowtype.Schema.tableRowType()

            // Gather all tables that need scanned, keyed by group
            AkibanInformationSchema oldAIS = schemaManager.getAis(session);
            Schema oldSchema = SchemaCache.globalSchema(oldAIS);
            Multimap<Group,RowType> groupMap = HashMultimap.create();
            for(ChangeSet cs : changeSets) {
                RowType rowType = oldSchema.tableRowType(cs.getTableId());
                groupMap.put(rowType.table().getGroup(), rowType);
            }
            // Scan all affected groups
            StoreAdapter adapter = store.createAdapter(session, oldSchema);
            final TransformCache transformCache = getTransformCache(session, null);
View Full Code Here

Examples of com.foundationdb.qp.rowtype.Schema.tableRowType()

                BasePlannable insertResult = compiler.compile((DMLStatementNode) insertStmt, null, planContext);
                insertPlan = insertResult.getPlannable();
                deletePlan = new Delete_Returning(insertPlan.getInputOperators().iterator().next(), false);
            }
            int tableID = cs.getTableId();
            TableRowType newType = newSchema.tableRowType(tableID);
            TableTransform transform = buildTableTransform(cs, changeLevel, oldAIS, newType, typesRegistry,
                                                typesTranslator, (Operator)deletePlan, (Operator)insertPlan);
            TableTransform prev = cache.put(tableID, transform);
            assert (prev == null) : tableID;
        }
View Full Code Here

Examples of com.foundationdb.qp.rowtype.Schema.tableRowType()

            };
        long nrows = external.loadTableFromCsv(session(), istr, new CsvFormat("UTF-8"),
                                               0, table, columns,
                                               -1, 1, queryContext);
        assertEquals(4, nrows);
        RowType rowType = schema.tableRowType(table);
        compareRows(new Row[] {
                        testRow(rowType, 1L, "Fred", SCHEMA),
                        testRow(rowType, 2L, "Wilma", SCHEMA),
                        testRow(rowType, 3L, "Barney", SCHEMA),
                        testRow(rowType, 4L, "Betty", SCHEMA)
View Full Code Here

Examples of com.foundationdb.qp.rowtype.Schema.tableRowType()

    private void checkLimitTable (Object[][] expected, TableName tableName, int limit)
    {
        Table table = ais().getTable(tableName);
        Schema schema = SchemaCache.globalSchema(ais());
        TableRowType rowType = schema.tableRowType(table);
        MemoryAdapter adapter = new MemoryAdapter(schema, session(), configService());

        QueryContext queryContext = new SimpleQueryContext(adapter);
        Row[] rows = objectToRows(expected, rowType);
View Full Code Here

Examples of com.foundationdb.qp.rowtype.Schema.tableRowType()

   
    private void checkSubsetTable(Object[][] expected, TableName tableName, int columnNum)
    {
        Table table = ais().getTable(tableName);
        Schema schema = SchemaCache.globalSchema(ais());
        TableRowType rowType = schema.tableRowType(table);
        MemoryAdapter adapter = new MemoryAdapter(schema, session(), configService());

        QueryContext queryContext = new SimpleQueryContext(adapter);
       
        List<TPreparedExpression> pExpressions = new ArrayList<>(1);
View Full Code Here

Examples of com.foundationdb.qp.rowtype.Schema.tableRowType()

    }

    private void checkTable (Object[][] expected, TableName table) {
        Table serverTable = ais().getTable(table);
        Schema schema = SchemaCache.globalSchema(ais());
        TableRowType rowType = schema.tableRowType(serverTable);
        MemoryAdapter adapter = new MemoryAdapter(schema, session(), null);

        Row[] rows = objectToRows(expected, rowType);

       
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.