public class VirtualTablePartitionRangeReadQuery extends VirtualTableReadQuery implements PartitionRangeReadQuery
Modifier and Type | Method and Description |
---|---|
protected void |
appendCQLWhereClause(java.lang.StringBuilder sb) |
ColumnFilter |
columnFilter()
A filter on which (non-PK) columns must be returned by the query.
|
static VirtualTablePartitionRangeReadQuery |
create(TableMetadata metadata,
int nowInSec,
ColumnFilter columnFilter,
RowFilter rowFilter,
DataLimits limits,
DataRange dataRange) |
DataRange |
dataRange() |
PartitionIterator |
executeInternal(ReadExecutionController controller)
Execute the query for internal queries (that is, it basically executes the query locally).
|
DataLimits |
limits()
The limits for the query.
|
TableMetadata |
metadata()
The metadata for the table this is a query on.
|
java.lang.String |
name() |
int |
nowInSec()
The time in seconds to use as "now" for this query.
|
protected UnfilteredPartitionIterator |
queryVirtualTable() |
RowFilter |
rowFilter()
Filters/Resrictions on CQL rows.
|
java.lang.String |
toCQLString()
Recreate the CQL string corresponding to this query.
|
PartitionRangeReadQuery |
withUpdatedLimit(DataLimits newLimits)
Creates a new
PartitionRangeReadQuery with the updated limits. |
PartitionRangeReadQuery |
withUpdatedLimitsAndDataRange(DataLimits newLimits,
DataRange newDataRange)
Creates a new
PartitionRangeReadQuery with the updated limits and data range. |
execute, executeLocally, executionController
abort, complete, creationTimeNanos, isAborted, isCompleted, isCrossNode, isInProgress, isSlow, setMonitoringTime, slowTimeoutNanos, timeoutNanos
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPager, selectsClustering, selectsFullPartition, selectsKey
columnFilter, empty, execute, executeInternal, executeLocally, executionController, isEmpty, limits, maybeValidateIndex, metadata, nowInSec, rowFilter
public static VirtualTablePartitionRangeReadQuery create(TableMetadata metadata, int nowInSec, ColumnFilter columnFilter, RowFilter rowFilter, DataLimits limits, DataRange dataRange)
create
in interface PartitionRangeReadQuery
public DataRange dataRange()
dataRange
in interface PartitionRangeReadQuery
public PartitionRangeReadQuery withUpdatedLimit(DataLimits newLimits)
PartitionRangeReadQuery
PartitionRangeReadQuery
with the updated limits.withUpdatedLimit
in interface PartitionRangeReadQuery
newLimits
- the new limitsPartitionRangeReadQuery
public PartitionRangeReadQuery withUpdatedLimitsAndDataRange(DataLimits newLimits, DataRange newDataRange)
PartitionRangeReadQuery
PartitionRangeReadQuery
with the updated limits and data range.withUpdatedLimitsAndDataRange
in interface PartitionRangeReadQuery
newLimits
- the new limitsPartitionRangeReadQuery
protected UnfilteredPartitionIterator queryVirtualTable()
queryVirtualTable
in class VirtualTableReadQuery
protected void appendCQLWhereClause(java.lang.StringBuilder sb)
public TableMetadata metadata()
ReadQuery
public java.lang.String name()
name
in interface Monitorable
public PartitionIterator executeInternal(ReadExecutionController controller)
ReadQuery
executeInternal
in interface ReadQuery
controller
- the ReadExecutionController
protecting the read.public DataLimits limits()
ReadQuery
public int nowInSec()
ReadQuery
We use the same time as "now" for the whole query to avoid considering different values as expired during the query, which would be buggy (would throw of counting amongst other things).
public RowFilter rowFilter()
ReadQuery
This contains the restrictions that are not directly handled by the
ClusteringIndexFilter
. More specifically, this includes any non-PK column
restrictions and can include some PK columns restrictions when those can't be
satisfied entirely by the clustering index filter (because not all clustering columns
have been restricted for instance). If there is 2ndary indexes on the table,
one of this restriction might be handled by a 2ndary index.
public ColumnFilter columnFilter()
ReadQuery
columnFilter
in interface ReadQuery
public java.lang.String toCQLString()
Note that in general the returned string will not be exactly the original user string, first because there isn't always a single syntax for a given query, but also because we don't have all the information needed (we know the non-PK columns queried but not the PK ones as internally we query them all). So this shouldn't be relied too strongly, but this should be good enough for debugging purpose which is what this is for.
Copyright © 2009-2021 The Apache Software Foundation