Package com.foundationdb.qp.operator

Examples of com.foundationdb.qp.operator.TimeOperator


    public Operator planLoadOnly(int columnCount, int joinColumns)
    {
        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
View Full Code Here


        }
        List<TPreparedExpression> innerExpressions = new ArrayList<>();
        for(int i : innerJoinFields){
            innerExpressions.add(new TPreparedField(innerRowType.typeAt(i), i));
        }
        innerTimeOperator = new TimeOperator(innerStream);
        outerTimeOperator = new TimeOperator(outerStream);
        Operator project = project_Default(
                hashTableLookup_Default(
                        innerRowType,
                        outerExpressions,
                        TABLE_BINDING_POSITION
View Full Code Here

        IndexKeyRange leftKeyRange = IndexKeyRange.bounded(indexRowType, leftBound, true, leftBound, true);
        IndexBound rightBound = new IndexBound(row(indexRowType, rightIndexKey), new SetColumnSelector(0));
        IndexKeyRange rightKeyRange = IndexKeyRange.bounded(indexRowType, rightBound, true, rightBound, true);
        Operator leftSetup = indexScan_Default(indexRowType, leftKeyRange, ordering);
        Operator rightSetup = indexScan_Default(indexRowType, rightKeyRange, ordering);
        TimeOperator timeLeftSetup = new TimeOperator(leftSetup);
        TimeOperator timeRightSetup = new TimeOperator(rightSetup);
        Operator union =
            hKeyUnion_Ordered(
                timeLeftSetup,
                timeRightSetup,
                indexRowType,
                indexRowType,
                5,
                5,
                5,
                tRowType);
        long start = System.nanoTime();
        for (int r = 0; r < runs; r++) {
            Cursor cursor = cursor(union, queryContext, queryBindings);
            cursor.openTopLevel();
            while (cursor.next() != null);
        }
        long stop = System.nanoTime();
        long intersectNsec = stop - start - timeLeftSetup.elapsedNsec() - timeRightSetup.elapsedNsec();
        if (label != null) {
            // Report the difference
            double averageUsecPerRow = intersectNsec / (1000.0 * runs * 2 * ROWS);
            System.out.println(String.format("%s: %s usec/row",
                                             label, averageUsecPerRow));
View Full Code Here

        Operator setup =
            project_DefaultTest(
                groupScan_Default(group),
                tRowType,
                projectFields);
        TimeOperator timeSetup = new TimeOperator(setup);
        RowType inputRowType = setup.rowType();
        Operator distinct = distinct_Partial(setup, inputRowType);
        long start = System.nanoTime();
        for (int r = 0; r < runs; r++) {
            Cursor cursor = cursor(distinct, queryContext, queryBindings);
            cursor.openTopLevel();
            while (cursor.next() != null);
        }
        long stop = System.nanoTime();
        long distinctNsec = stop - start - timeSetup.elapsedNsec();
        if (label != null) {
            // Report the difference
            double averageUsecPerRow = distinctNsec / (1000.0 * runs * ROWS);
            System.out.println(String.format("%s, %s fields: %s usec/row",
                                             label, fields, averageUsecPerRow));
View Full Code Here

TOP

Related Classes of com.foundationdb.qp.operator.TimeOperator

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.