Package com.foundationdb.qp.expression

Examples of com.foundationdb.qp.expression.IndexKeyRange


        List<ExpressionGenerator> expressions = Arrays.asList(boundField(cidValueRowType, 1, 0));
        IndexBound cidBound =
            new IndexBound(
                new RowBasedUnboundExpressions(customerCidIndexRowType, expressions, true),
                new SetColumnSelector(0));
        IndexKeyRange cidRange = IndexKeyRange.bounded(customerCidIndexRowType, cidBound, true, cidBound, true);
        Operator plan =
            map_NestedLoops(
                valuesScan_Default(
                        bindableExpressions(intRow(cidValueRowType, 1),
                                intRow(cidValueRowType, 2),
View Full Code Here


    @Test
    public void testBug1018206()
    {
        IndexBound cnameBound = new IndexBound(row(customerNameItemOidIndexRowType, "nea"), new SetColumnSelector(0));
        IndexKeyRange cnameRange = IndexKeyRange.bounded(customerNameItemOidIndexRowType, cnameBound, true, cnameBound, true);
        IndexScanSelector indexScanSelector = IndexScanSelector.leftJoinAfter(customerNameItemOidIndexRowType.index(),
                                                                              customerRowType.table());
        Operator flatten =
            flatten_HKeyOrdered(
                ancestorLookup_Default(
View Full Code Here

                               @Override
                               public boolean includesColumn(int columnPosition) {
                                   return columnPosition < nkeys;
                               }
                           });
        IndexKeyRange indexRange = IndexKeyRange.bounded(indexType,
                                                         bound, true,
                                                         bound, true);

        Ordering ordering = API.ordering();
        for (int i = 0; i < nkeys; i++) {
View Full Code Here

    @Test(expected = IllegalArgumentException.class)
    public void testMoreThanOneInequalityUnidirectional()
    {
        IndexBound loBound = new IndexBound(row(itemOidIidIndexRowType, 10, 10), new SetColumnSelector(0, 1));
        IndexBound hiBound = new IndexBound(row(itemOidIidIndexRowType, 20, 20), new SetColumnSelector(0, 1));
        IndexKeyRange keyRange = IndexKeyRange.bounded(itemOidIidIndexRowType, loBound, false, hiBound, false);
        Operator indexScan = indexScan_Default(itemOidIidIndexRowType, false, keyRange);
        String[] expected = new String[]{};
        compareRenderedHKeys(expected, cursor(indexScan, queryContext, queryBindings));
    }
View Full Code Here

    @Test(expected = IllegalArgumentException.class)
    public void testMoreThanOneInequalityMixedMode()
    {
        IndexBound loBound = new IndexBound(row(itemOidIidIndexRowType, 10, 10), new SetColumnSelector(0, 1));
        IndexBound hiBound = new IndexBound(row(itemOidIidIndexRowType, 20, 20), new SetColumnSelector(0, 1));
        IndexKeyRange keyRange = IndexKeyRange.bounded(itemOidIidIndexRowType, loBound, false, hiBound, false);
        API.Ordering ordering = new API.Ordering();
        ordering.append(ExpressionGenerators.field(itemOidIidIndexRowType, 0), true);
        ordering.append(ExpressionGenerators.field(itemOidIidIndexRowType, 1), false);
        Operator indexScan = indexScan_Default(itemOidIidIndexRowType, keyRange, ordering);
        String[] expected = new String[]{};
View Full Code Here

        for (int orderingMask : orderingMasks) {
            for (long childPK : childPKs) {
                long parentPK = childPK / 10;
                IndexBound loBound = new IndexBound(row(childPKRowType, childPK, parentPK, parentPK - 1), SELECTOR);
                IndexBound hiBound = new IndexBound(row(childPKRowType, childPK, parentPK, parentPK), SELECTOR);
                IndexKeyRange range = IndexKeyRange.bounded(childPKRowType, loBound, true, hiBound, true);
                Operator plan = indexScan_Default(childPKRowType, range, ordering(orderingMask));
                Row[] expected = new Row[] {
                    row(childRowType, childPK, parentPK, parentPK),
                };
                compareRows(expected, cursor(plan, queryContext, queryBindings));
View Full Code Here

        long[] childPKs = new long[] {11, 12, 21, 22};
        for (int orderingMask = 0x0; orderingMask <= 0x7; orderingMask++) {
            for (long childPK : childPKs) {
                long parentPK = childPK / 10;
                IndexBound bound = new IndexBound(row(childPKRowType, childPK, parentPK, parentPK), SELECTOR);
                IndexKeyRange range = IndexKeyRange.bounded(childPKRowType, bound, true, bound, true);
                Operator plan = indexScan_Default(childPKRowType, range, ordering(orderingMask));
                Row[] expected = new Row[] {
                    row(childRowType, childPK, parentPK, parentPK),
                };
                compareRows(expected, cursor(plan, queryContext, queryBindings));
View Full Code Here

            // Empty due to pid1
            for (long childPK : childPKs) {
                long parentPK = childPK / 10;
                IndexBound loBound = new IndexBound(row(childPKRowType, childPK, parentPK + 1, parentPK + 1), SELECTOR);
                IndexBound hiBound = new IndexBound(row(childPKRowType, childPK, parentPK + 1, parentPK + 1), SELECTOR);
                IndexKeyRange range = IndexKeyRange.bounded(childPKRowType, loBound, true, hiBound, true);
                Operator plan = indexScan_Default(childPKRowType, range, ordering(orderingMask));
                Row[] expected = new Row[] {
                };
                compareRows(expected, cursor(plan, queryContext, queryBindings));
            }
            // Empty due to pid2
            for (long childPK : childPKs) {
                long parentPK = childPK / 10;
                IndexBound loBound = new IndexBound(row(childPKRowType, childPK, parentPK, parentPK + 1), SELECTOR);
                IndexBound hiBound = new IndexBound(row(childPKRowType, childPK, parentPK, parentPK + 1), SELECTOR);
                IndexKeyRange range = IndexKeyRange.bounded(childPKRowType, loBound, true, hiBound, true);
                Operator plan = indexScan_Default(childPKRowType, range, ordering(orderingMask));
                Row[] expected = new Row[] {
                };
                compareRows(expected, cursor(plan, queryContext, queryBindings));
            }
                // Non-empty
            for (long childPK : childPKs) {
                long parentPK = childPK / 10;
                IndexBound loBound = new IndexBound(row(childPKRowType, childPK, parentPK, parentPK), SELECTOR);
                IndexBound hiBound = new IndexBound(row(childPKRowType, childPK, parentPK, parentPK + 1), SELECTOR);
                IndexKeyRange range = IndexKeyRange.bounded(childPKRowType, loBound, true, hiBound, true);
                Operator plan = indexScan_Default(childPKRowType, range, ordering(orderingMask));
                Row[] expected = new Row[] {
                    row(childRowType, childPK, parentPK, parentPK),
                };
                compareRows(expected, cursor(plan, queryContext, queryBindings));
View Full Code Here

        for (int orderingMask = 0x0; orderingMask <= 0x7; orderingMask++) {
            for (long childPK : childPKs) {
                long parentPK = childPK / 10;
                IndexBound loBound = new IndexBound(row(childPKRowType, childPK, parentPK, parentPK - 1), SELECTOR);
                IndexBound hiBound = new IndexBound(row(childPKRowType, childPK, parentPK, parentPK), SELECTOR);
                IndexKeyRange range = IndexKeyRange.bounded(childPKRowType, loBound, true, hiBound, true);
                Operator plan = indexScan_Default(childPKRowType, range, ordering(orderingMask));
                Row[] expected = new Row[] {
                    row(childRowType, childPK, parentPK, parentPK),
                };
                compareRows(expected, cursor(plan, queryContext, queryBindings));
View Full Code Here

        for (int orderingMask : orderingMasks) {
            for (long childPK : childPKs) {
                long parentPK = childPK / 10;
                IndexBound loBound = new IndexBound(row(childPKRowType, childPK, parentPK, parentPK), SELECTOR);
                IndexBound hiBound = new IndexBound(row(childPKRowType, childPK, parentPK, parentPK), SELECTOR);
                IndexKeyRange range = IndexKeyRange.bounded(childPKRowType, loBound, true, hiBound, true);
                Operator plan = indexScan_Default(childPKRowType, range, ordering(orderingMask));
                Row[] expected = new Row[] {
                    row(childRowType, childPK, parentPK, parentPK),
                };
                compareRows(expected, cursor(plan, queryContext, queryBindings));
View Full Code Here

TOP

Related Classes of com.foundationdb.qp.expression.IndexKeyRange

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.