Examples of nFields()


Examples of com.foundationdb.qp.rowtype.IndexRowType.nFields()

        TInstance lonInstance = index.getAllColumns().get(lonColumn).getColumn().getType();
        BigDecimal lat = TBigDecimal.getWrapper(loExpressions.value(latColumn), latInstance).asBigDecimal();
        BigDecimal lon = TBigDecimal.getWrapper(loExpressions.value(lonColumn), lonInstance).asBigDecimal();
        zStart = Spatial.shuffle(space, lat.doubleValue(), lon.doubleValue());
        // Cursors going forward from starting z value (inclusive), and backward from the same z value (exclusive)
        int indexRowFields = physicalIndexRowType.nFields();
        SpatialIndexValueRecord zForwardRow = new SpatialIndexValueRecord(indexRowFields);
        SpatialIndexValueRecord zBackwardRow = new SpatialIndexValueRecord(indexRowFields);
        SpatialIndexValueRecord zMaxRow = new SpatialIndexValueRecord(indexRowFields);
        SpatialIndexValueRecord zMinRow = new SpatialIndexValueRecord(indexRowFields);
        IndexBound zForward = new IndexBound(zForwardRow, indexColumnSelector);
View Full Code Here

Examples of com.foundationdb.qp.rowtype.IndexRowType.nFields()

        IndexKeyRange ltKeyRange = IndexKeyRange.bounded(physicalIndexRowType, zMin, false, zBackward, false);
        IterationHelper geRowState = adapter.createIterationHelper(keyRange.indexRowType());
        IterationHelper ltRowState = adapter.createIterationHelper(keyRange.indexRowType());
        API.Ordering upOrdering = new API.Ordering();
        API.Ordering downOrdering = new API.Ordering();
        for (int f = 0; f < physicalIndexRowType.nFields(); f++) {
            // TODO: This seems like an API hack
            upOrdering.append((TPreparedExpression)null, true);
            downOrdering.append((TPreparedExpression)null, false);
        }
        geCursor = new IndexCursorUnidirectional<>(context,
View Full Code Here

Examples of com.foundationdb.qp.rowtype.IndexRowType.nFields()

        this.space = spatialIndex.space();
        this.latColumn = spatialIndex.firstSpatialArgument();
        this.lonColumn = latColumn + 1;
        API.Ordering zOrdering = new API.Ordering();
        IndexRowType rowType = keyRange.indexRowType().physicalRowType();
        for (int f = 0; f < rowType.nFields(); f++) {
            zOrdering.append(new TPreparedField(rowType.typeAt(f), f), true);
        }
        // The index column selector needs to select all the columns before the z column, and the z column itself.
        this.indexColumnSelector = new IndexRowPrefixSelector(this.latColumn + 1);
        for (IndexKeyRange zKeyRange : zKeyRanges(context, keyRange)) {
View Full Code Here

Examples of com.foundationdb.qp.rowtype.IndexRowType.nFields()

        space.decompose(box, zValues);
        for (int i = 0; i < zValues.length; i++) {
            long z = zValues[i];
            if (z != -1L) {
                IndexRowType physicalRowType = keyRange.indexRowType().physicalRowType();
                int indexRowFields = physicalRowType.nFields();
                SpatialIndexValueRecord zLoRow = new SpatialIndexValueRecord(indexRowFields);
                SpatialIndexValueRecord zHiRow = new SpatialIndexValueRecord(indexRowFields);
                IndexBound zLo = new IndexBound(zLoRow, indexColumnSelector);
                IndexBound zHi = new IndexBound(zHiRow, indexColumnSelector);
                // Take care of any equality restrictions before the spatial fields
View Full Code Here

Examples of com.foundationdb.qp.rowtype.RowType.nFields()

                    // Common case coming out of default Sorters
                    if(next instanceof ValuesHolderRow) {
                        ValuesHolderRow valuesRow = (ValuesHolderRow)next;
                        RowType realRowType = bufferRowType.second();
                        List<Value> values = valuesRow.values();
                        next = new ValuesHolderRow(realRowType, values.subList(1, realRowType.nFields() + 1));
                    } else if(next instanceof CompoundRow) {
                        next = ((CompoundRow)next).subRow(bufferRowType.second());
                    } else {
                        throw new IllegalStateException("Unexpected Row: " + next.getClass());
                    }
View Full Code Here

Examples of com.foundationdb.qp.rowtype.RowType.nFields()

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

Examples of com.foundationdb.qp.rowtype.RowType.nFields()

            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.TableRowType.nFields()

            insertExprs.add(new TPreparedField(input.rowType.typeAt(i), i));
        }
        // Fill in input values
        Iterator<Column> colIt = inputColumns.iterator();
        TableRowType targetRowType = schema().tableRowType(table);
        TPreparedExpression[] row = new TPreparedExpression[targetRowType.nFields()];
        for (int i = 0; i < inputColumns.size(); i++) {
            Column column = colIt.next();
            TInstance type = column.getType();
            int pos = column.getPosition();
            row[pos] = insertExprs.get(i);
View Full Code Here

Examples of com.foundationdb.qp.rowtype.TableRowType.nFields()

                                                                        type.typeClass());
                row[pos] = new TCastExpression(row[pos], tcast, type);
            }
        }
        // Fill in column defaults
        for(int i = 0, len = targetRowType.nFields(); i < len; ++i) {
            Column column = table.getColumnsIncludingInternal().get(i);
            row[i] = PlanGenerator.generateDefaultExpression(column,
                                                             row[i],
                                                             registryService(),
                                                             getTypesTranslator(),
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.