Package com.foundationdb.qp.expression

Examples of com.foundationdb.qp.expression.IndexBound


        testCursorLifecycle(plan, testCase);
    }

    private IndexKeyRange cidKeyRange(int cid)
    {
        IndexBound bound = new IndexBound(row(orderCidIndexRowType, cid), new SetColumnSelector(0));
        return IndexKeyRange.bounded(orderCidIndexRowType, bound, true, bound, true);
    }
View Full Code Here


                    true);
    }

    private IndexKeyRange parentXEq(long x)
    {
        IndexBound xBound = new IndexBound(row(parentXIndexRowType, x), new SetColumnSelector(0));
        return IndexKeyRange.bounded(parentXIndexRowType, xBound, true, xBound, true);
    }
View Full Code Here

        return IndexKeyRange.bounded(parentXIndexRowType, xBound, true, xBound, true);
    }

    private IndexKeyRange childYEq(long y)
    {
        IndexBound yBound = new IndexBound(row(childYIndexRowType, y), new SetColumnSelector(0));
        return IndexKeyRange.bounded(childYIndexRowType, yBound, true, yBound, true);
    }
View Full Code Here

        List<TPreparedExpression> pexprs = new ArrayList<>(nkeys);
        for (int i = 0; i < nkeys; i++) {
            pexprs.add(new TPreparedParameter(i, indexType.typeAt(i)));
        }
        IndexBound bound =
            new IndexBound(new RowBasedUnboundExpressions(indexType, pexprs),
                           new ColumnSelector() {
                               @Override
                               public boolean includesColumn(int columnPosition) {
                                   return columnPosition < nkeys;
                               }
View Full Code Here

    }

    @Test(expected = IllegalArgumentException.class)
    public void testNullLoAndHiSelectorsMismatch()
    {
        IndexBound loBound = new IndexBound(row(itemOidIidIndexRowType, 0, 0), new SetColumnSelector(0));
        IndexBound hiBound = new IndexBound(row(itemOidIidIndexRowType, 0, 0), new SetColumnSelector(1));
        IndexKeyRange.bounded(itemOidIidIndexRowType, loBound, false, hiBound, false);
    }
View Full Code Here

    }

    @Test(expected = IllegalArgumentException.class)
    public void testSelectorForNonLeadingColumn()
    {
        IndexBound loBound = new IndexBound(row(itemOidIidIndexRowType, 0, 0), new SetColumnSelector(1));
        IndexBound hiBound = new IndexBound(row(itemOidIidIndexRowType, 0, 0), new SetColumnSelector(1));
        IndexKeyRange.bounded(itemOidIidIndexRowType, loBound, false, hiBound, false);
    }
View Full Code Here

    }

    @Test
    public void testLegalSelector()
    {
        IndexBound loBound = new IndexBound(row(itemOidIidIndexRowType, 0, 0), new SetColumnSelector(0));
        IndexBound hiBound = new IndexBound(row(itemOidIidIndexRowType, 0, 0), new SetColumnSelector(0));
        IndexKeyRange.bounded(itemOidIidIndexRowType, loBound, false, hiBound, false);
    }
View Full Code Here

    // Check invalid ranges (can only be done when cursor is opened)

    @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);
View Full Code Here

        return IndexKeyRange.bounded(itemIidIndexRowType, iidBound(lo), loInclusive, iidBound(hi), hiInclusive);
    }

    private IndexBound iidBound(int iid)
    {
        return new IndexBound(row(itemIidIndexRowType, iid), new SetColumnSelector(0));
    }
View Full Code Here

TOP

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

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.