Package com.foundationdb.qp.row

Examples of com.foundationdb.qp.row.OverlayingRow


    private void testJump(Cursor cursor, long[] idOrdering, int nudge)
    {
        for (int start = 0; start < idOrdering.length; start++) {
            TestRow target = indexRow(idOrdering[start]);
            // Add nudge to last field
            OverlayingRow nudgedTarget = new OverlayingRow(target);
            nudgedTarget.overlay(3, (long)(target.value(3).getInt32() + nudge));
            cursor.jump(nudgedTarget, INDEX_ROW_SELECTOR);
            Row row;
            List<Long> actualIds = new ArrayList<>();
            while ((row = cursor.next()) != null) {
                actualIds.add(getLong(row, 3));
View Full Code Here


            @Override
            public Row evaluate(Row original, QueryContext context, QueryBindings bindings)
            {
                long ax = original.value(1).getInt64();
                return new OverlayingRow(original).overlay(1, -ax);
            }
        };
        UpdateFunction updateBFunction = new UpdateFunction()
        {

            @Override
            public boolean rowIsSelected(Row row)
            {
                return row.rowType().equals(bRowType);
            }

            @Override
            public Row evaluate(Row original, QueryContext context, QueryBindings bindings)
            {
                long bx = original.value(1).getInt64();
                return new OverlayingRow(original).overlay(1, -bx);
            }
        };
        UpdatePlannable updateA = update_Default(groupScan_Default(aGroup), updateAFunction);
        UpdatePlannable updateB = update_Default(groupScan_Default(bGroup), updateBFunction);
/*
 
View Full Code Here

            public Row evaluate(Row original, QueryContext context, QueryBindings bindings) {
                String name = original.value(1).getString();
                // TODO eventually use Expression for this
                name = name.toUpperCase();
                name = name + name;
                return new OverlayingRow(original).overlay(1, name);
            }
        };

        Operator groupScan = groupScan_Default(coi);
        UpdatePlannable updateOperator = update_Default(groupScan, updateFunction);
View Full Code Here

                @Override
                public Row evaluate(Row original, QueryContext context, QueryBindings bindings) {
                    long id = original.value(0).getInt64();
                    // Make smaller to avoid Halloween (see next test).
                    return new OverlayingRow(original).overlay(0, id - 100);
                }
            };

        UpdatePlannable updateOperator = update_Default(scan, updateFunction);
        UpdateResult result = updateOperator.run(queryContext, queryBindings);
View Full Code Here

            return true;
        }
       
        @Override
        public Row evaluate(Row original, QueryContext context, QueryBindings bindings) {
            OverlayingRow overlay = new OverlayingRow(original);
            for (int i = 0; i < ncols; i++) {
                overlay.overlay(updatePositions[i],
                                // new values come after old keys.
                                bindings.getValue(ncols + i));
            }
            return overlay;
        }       
View Full Code Here

                                      context,
                                      bindings,
                                      ProjectedRow.createTEvaluatableExpressions(pProjections)
            );
        } else {
            newRow = new OverlayingRow(origRow, transform.rowType);
        }
        return newRow;
    }
View Full Code Here

TOP

Related Classes of com.foundationdb.qp.row.OverlayingRow

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.