private ResultSet columnScan ( DeltaPlacement placement , TableDDL tableDDL , ByteBuffer rowKey , Range < RangeTimeUUID > columnRange , boolean ascending , ConsistencyLevel consistency ) { Select . Where where = ( tableDDL == placement . getBlockedDeltaTableDDL ( ) ? selectDeltaFrom ( placement . getBlockedDeltaTableDDL ( ) ) : selectFrom ( tableDDL ) ) . where ( eq ( tableDDL . getRowKeyColumnName ( ) , rowKey ) ) ; if ( columnRange . hasLowerBound ( ) ) { if ( columnRange . lowerBoundType ( ) == BoundType . CLOSED ) { where = where . and ( gte ( tableDDL . getChangeIdColumnName ( ) , columnRange . lowerEndpoint ( ) . getUuid ( ) ) ) ; } else { where = where . and ( gt ( tableDDL . getChangeIdColumnName ( ) , columnRange . lowerEndpoint ( ) . getUuid ( ) ) ) ; } } if ( columnRange . hasUpperBound ( ) ) { if ( columnRange . upperBoundType ( ) == BoundType . CLOSED ) { where = where . and ( lte ( tableDDL . getChangeIdColumnName ( ) , columnRange . upperEndpoint ( ) . getUuid ( ) ) ) ; } else { where = where . and ( lt ( tableDDL . getChangeIdColumnName ( ) , columnRange . upperEndpoint ( ) . getUuid ( ) ) ) ; } } Statement statement = where . orderBy ( ascending ? asc ( tableDDL . getChangeIdColumnName ( ) ) : desc ( tableDDL . getChangeIdColumnName ( ) ) ) . setConsistencyLevel ( consistency ) ; return AdaptiveResultSet . executeAdaptiveQuery ( placement . getKeyspace ( ) . getCqlSession ( ) , statement , _driverConfig . getSingleRowFetchSize ( ) ) ; }
Reads columns from the delta or delta history table . The range of columns order and limit can be parameterized .