Examples of RowType


Examples of com.foundationdb.qp.rowtype.RowType

    @Override
    public String toString() {
        StringBuilder builder = new StringBuilder();
        builder.append(this.getClass().getSimpleName()).append('[');
        RowType rowType = rowType();
        final int fieldsCount = rowType.nFields();
        AkibanAppender appender = AkibanAppender.of(builder);
        for (int i=0; i < fieldsCount; ++i) {
            if (rowType.typeAt(i) == null) {
                assert value(i).isNull();
                builder.append("NULL");
            }
            else {
                if (value(i).hasAnyValue()) {
                    rowType.typeAt(i).format(value(i), appender);
                } else {
                    builder.append("Unset");
                }
            }
            if(i+1 < fieldsCount) {
View Full Code Here

Examples of com.foundationdb.qp.rowtype.RowType

    @Test
    public void writeRowHKeyChangePropagation() {
        final TableIds tids = createTables();
        Schema schema = SchemaCache.globalSchema(ddl().getAIS(session()));
        RowType cType = schema.tableRowType(getTable(tids.c));
        RowType oType = schema.tableRowType(getTable(tids.o));
        RowType iType = schema.tableRowType(getTable(tids.i));
        StoreAdapter adapter = newStoreAdapter(schema);

        Object[] o1Cols = { 10, 1 };
        Object[] cCols = { 2, "c2" };
        Object[] oCols = { 20, 2 };
View Full Code Here

Examples of com.foundationdb.qp.rowtype.RowType

    @Test
    public void deleteRowHKeyChangePropagation() {
        final TableIds tids = createTables();
        Schema schema = SchemaCache.globalSchema(ddl().getAIS(session()));
        RowType cType = schema.tableRowType(getTable(tids.c));
        RowType oType = schema.tableRowType(getTable(tids.o));
        RowType iType = schema.tableRowType(getTable(tids.i));
        StoreAdapter adapter = newStoreAdapter(schema);

        Object[] o1Cols = { 10, 1 };
        Object[] cCols = { 2, "c2" };
        Object[] oCols = { 20, 2 };
View Full Code Here

Examples of com.foundationdb.qp.rowtype.RowType

    @Test
    public void updateRowHKeyChangePropagation() {
        final TableIds tids = createTables();
        Schema schema = SchemaCache.globalSchema(ddl().getAIS(session()));
        RowType cType = schema.tableRowType(getTable(tids.c));
        RowType oType = schema.tableRowType(getTable(tids.o));
        RowType iType = schema.tableRowType(getTable(tids.i));
        StoreAdapter adapter = newStoreAdapter(schema);

        Object[] o1Cols = { 10, 1 };
        Object[] cCols = { 2, "c2" };
        Object[] oOrig = { 1, 1 };
View Full Code Here

Examples of com.foundationdb.qp.rowtype.RowType

        List<List<?>> actualResults = new ArrayList<>();
        Cursor cursor =  API.cursor(plan, queryContext, queryBindings);
        cursor.openTopLevel();
        try {
            for (Row row = cursor.next(); row != null; row = cursor.next()) {
                RowType rowType = row.rowType();
                int fields =
                    rowType instanceof IndexRowType
                    ? ((IndexRowType)rowType).index().getKeyColumns().size()
                    : rowType.nFields();
                Object[] rowArray = new Object[fields];
                for (int i=0; i < rowArray.length; ++i) {
                    Object fromRow;
                    fromRow = getObject(row.value(i));
                    rowArray[i] = fromRow;
View Full Code Here

Examples of com.foundationdb.qp.rowtype.RowType

                branchLookup_Nested(coi, flattenCO.rowType(), customerRowType, null, list(addressRowType), InputPreservationOption.KEEP_INPUT, 0, lookaheadQuantum()),
                customerRowType,
                addressRowType,
                INNER_JOIN);
        Operator product = product_Nested(flattenCA, flattenCO.rowType(), null, flattenCA.rowType(), 0);
        RowType coaRowType = product.rowType();
        checkRowTypeFields(null, coaRowType,
                MNumeric.INT.instance(false),
                MString.VARCHAR.instance(20, true),
                MNumeric.INT.instance(false),
                MNumeric.INT.instance(true),
View Full Code Here

Examples of com.foundationdb.qp.rowtype.RowType

                branchLookup_Nested(coi, flattenCO.rowType(), customerRowType, null, list(addressRowType), InputPreservationOption.KEEP_INPUT, 0, lookaheadQuantum()),
                customerRowType,
                addressRowType,
                INNER_JOIN);
        Operator product = product_Nested(flattenCA, flattenCO.rowType(), null, flattenCA.rowType(), 0);
        RowType coaRowType = product.rowType();
       
        checkRowTypeFields(null, coaRowType,
                MNumeric.INT.instance(false),
                MString.VARCHAR.instance(20, true),
                MNumeric.INT.instance(false),
View Full Code Here

Examples of com.foundationdb.qp.rowtype.RowType

                flattenCAInner,
                flattenCAOuter.rowType(),
                customerRowType,
                flattenCAInner.rowType(),
                0);
        RowType productRowType = product.rowType();
        Operator plan = map_NestedLoops(flattenCAOuter, product, 0, pipelineMap(), 1);
        Row[] expected = new Row[]{
            row(productRowType, 1L, "northbridge", 1000L, 1L, "111 1000 st", 1000L, 1L, "111 1000 st"),
            row(productRowType, 1L, "northbridge", 1000L, 1L, "111 1000 st", 1001L, 1L, "111 1001 st"),
            row(productRowType, 1L, "northbridge", 1001L, 1L, "111 1001 st", 1000L, 1L, "111 1000 st"),
View Full Code Here

Examples of com.foundationdb.qp.rowtype.RowType

                branchLookup_Nested(coi, flattenCO.rowType(), customerRowType, null, list(addressRowType), InputPreservationOption.KEEP_INPUT, 0, lookaheadQuantum()),
                customerRowType,
                addressRowType,
                INNER_JOIN);
        Operator product = product_Nested(flattenCA, flattenCO.rowType(), null, flattenCA.rowType(), 0);
        final RowType coaRowType = product.rowType();
        Operator plan = map_NestedLoops(flattenCO, product, 0, pipelineMap(), 1);
        CursorLifecycleTestCase testCase = new CursorLifecycleTestCase()
        {
            @Override
            public Row[] firstExpectedRows()
View Full Code Here

Examples of com.foundationdb.qp.rowtype.RowType

    @Test
    public void testAncestorLookupMap()
    {
        moreDB();
        RowType cidValueRowType = schema.newValuesType(MNumeric.INT.instance(true));
        List<ExpressionGenerator> cidExprs = Arrays.asList(boundField(cidValueRowType, 1, 0));
        IndexBound cidBound =
            new IndexBound(
                new RowBasedUnboundExpressions(orderCidIndexRowType, cidExprs, true),
                new SetColumnSelector(0));
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.