Package com.foundationdb.qp.storeadapter.indexrow

Examples of com.foundationdb.qp.storeadapter.indexrow.SpatialColumnHandler


        boolean bumpCount = false;
        WriteIndexRow indexRow = new WriteIndexRow(this);
        for(TableIndex index : indexes) {
            long zValue = -1;
            SpatialColumnHandler spatialColumnHandler = null;
            if (index.isSpatial()) {
                spatialColumnHandler = new SpatialColumnHandler(index);
                zValue = spatialColumnHandler.zValue(rowData);
            }
            writeIndexRow(session, index, rowData, hKey, indexRow, spatialColumnHandler, zValue, false);
            // Only bump row count if PK row is written (may not be written during an ALTER)
            // Bump row count *after* uniqueness checks. Avoids drift of TableStatus#getApproximateRowCount. See bug1112940.
            bumpCount |= index.isPrimaryKey();
View Full Code Here


        // Remove all indexes (before the group row is gone in-case listener needs it)
        WriteIndexRow indexRow = new WriteIndexRow(this);
        for(TableIndex index : rowDef.getIndexes()) {
            long zValue = -1;
            SpatialColumnHandler spatialColumnHandler = null;
            if (index.isSpatial()) {
                spatialColumnHandler = new SpatialColumnHandler(index);
                zValue = spatialColumnHandler.zValue(rowData);
            }
            deleteIndexRow(session, index, rowData, hKey, indexRow, spatialColumnHandler, zValue, false);
        }

        // Remove the group row
View Full Code Here

                        // Don't call deleteRow as the hKey does not need recomputed.
                        clear(session, storeData);
                        table.rowDef().getTableStatus().rowDeleted(session);
                        for(TableIndex index : table.rowDef().getIndexes()) {
                            long zValue = -1;
                            SpatialColumnHandler spatialColumnHandler = null;
                            if (index.isSpatial()) {
                                spatialColumnHandler = new SpatialColumnHandler(index);
                                zValue = spatialColumnHandler.zValue(rowData);
                            }
                            deleteIndexRow(session, index, rowData, hKey, indexRowBuffer, spatialColumnHandler, zValue, false);
                        }
                        if(!cascadeDelete) {
                            // Reinsert it, recomputing the hKey and maintaining indexes
View Full Code Here

        if(!fieldsEqual(oldRowDef, oldRow, newRowDef, newRow, nkeys, indexRowComposition)) {
            UPDATE_INDEX_TAP.in();
            try {
                long oldZValue = -1;
                long newZValue = -1;
                SpatialColumnHandler spatialColumnHandler = null;
                if (index.isSpatial()) {
                    spatialColumnHandler = new SpatialColumnHandler(index);
                    oldZValue = spatialColumnHandler.zValue(oldRow);
                    newZValue = spatialColumnHandler.zValue(newRow);
                }
                deleteIndexRow(session, index, oldRow, hKey, indexRowBuffer, spatialColumnHandler, oldZValue, false);
                writeIndexRow(session, index, newRow, hKey, indexRowBuffer, spatialColumnHandler, newZValue, false);
            } finally {
                UPDATE_INDEX_TAP.out();
View Full Code Here

                    RowData rowData = ((AbstractRow)row).rowData();
                    TableTransform transform = transformCache.get(rowData.getRowDefId());
                    simpleCheckConstraints(session, transform, rowData);
                    for(TableIndex index : transform.tableIndexes) {
                        long zValue = -1;
                        SpatialColumnHandler spatialColumnHandler = null;
                        if (index.isSpatial()) {
                            spatialColumnHandler = new SpatialColumnHandler(index);
                            zValue = spatialColumnHandler.zValue(rowData);
                        }
                        Key hKey = store.createKey();
                        row.hKey().copyTo(hKey);
                        store.writeIndexRow(session, index, rowData, hKey, buffer,
                                            spatialColumnHandler, zValue, true);
View Full Code Here

                if(!transform.tableIndexes.isEmpty()) {
                    WriteIndexRow buffer = new WriteIndexRow (store);
                    for(TableIndex index : transform.tableIndexes) {
                        long oldZValue = -1;
                        long newZValue = -1;
                        SpatialColumnHandler spatialColumnHandler = null;
                        if (index.isSpatial()) {
                            spatialColumnHandler = new SpatialColumnHandler(index);
                            oldZValue = spatialColumnHandler.zValue(oldRowData);
                            newZValue = spatialColumnHandler.zValue(newRowData);
                        }
                        if(doDelete) {
                            store.deleteIndexRow(session, index, oldRowData, hKey, buffer, spatialColumnHandler, oldZValue, false);
                        }
                        if(doWrite) {
View Full Code Here

TOP

Related Classes of com.foundationdb.qp.storeadapter.indexrow.SpatialColumnHandler

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.