public class TiDAGRequest extends Object implements Serializable
Used for constructing a new DAG request to TiKV
Modifier and Type | Class and Description |
---|---|
static class |
TiDAGRequest.Builder |
static class |
TiDAGRequest.IndexScanType |
static class |
TiDAGRequest.PushDownType
Whether we use streaming to push down the request
|
static class |
TiDAGRequest.TruncateMode |
Constructor and Description |
---|
TiDAGRequest(TiDAGRequest.PushDownType pushDownType) |
TiDAGRequest(TiDAGRequest.PushDownType pushDownType,
EncodeType encodeType,
int timeZoneOffset) |
TiDAGRequest(TiDAGRequest.PushDownType pushDownType,
int timeZoneOffset) |
public TiDAGRequest(TiDAGRequest.PushDownType pushDownType)
public TiDAGRequest(TiDAGRequest.PushDownType pushDownType, EncodeType encodeType, int timeZoneOffset)
public TiDAGRequest(TiDAGRequest.PushDownType pushDownType, int timeZoneOffset)
public List<TiPartitionDef> getPrunedParts()
public void setPrunedParts(List<TiPartitionDef> prunedParts)
public TiStoreType getStoreType()
public void setStoreType(TiStoreType storeType)
public EncodeType getEncodeType()
public void setEncodeType(EncodeType encodeType)
public DAGRequest buildIndexScan()
public DAGRequest buildTableScan()
public TiTableInfo getTableInfo()
public TiDAGRequest setTableInfo(TiTableInfo tableInfo)
public long getPhysicalId()
public TiDAGRequest setPhysicalId(long id)
public TiIndexInfo getIndexInfo()
public TiDAGRequest setIndexInfo(TiIndexInfo indexInfo)
public void clearIndexInfo()
public int getLimit()
public TiDAGRequest setLimit(int limit)
limit
- is just a integer.public TiTimestamp getStartTs()
public TiDAGRequest setStartTs(@Nonnull TiTimestamp startTs)
startTs
- timestamppublic TiDAGRequest setHaving(Expression having)
having
- is a expression represents Havingpublic boolean isDistinct()
public TiDAGRequest setDistinct(boolean distinct)
public TiDAGRequest addAggregate(AggregateFunction expr)
public TiDAGRequest addOrderByItem(ByItem byItem)
byItem
- is a TiByItem.public TiDAGRequest addGroupByItem(ByItem byItem)
byItem
- is a TiByItempublic TiDAGRequest addRequiredColumn(ColumnRef column)
This interface allows duplicate columns and it's user's responsibility to do dedup since we need to ensure exact order and items preserved during decoding
column
- is column referred during selectReqpublic TiDAGRequest addRanges(Map<Long,List<Coprocessor.KeyRange>> ranges)
ranges
- key range of scanpublic void resetFilters(List<Expression> filters)
public List<Coprocessor.KeyRange> getRangesByPhysicalId(long physicalId)
public Map<Long,List<Coprocessor.KeyRange>> getRangesMaps()
public TiDAGRequest addFilters(List<Expression> filters)
public List<Expression> getFilters()
public void addDowngradeFilter(Expression filter)
public List<Expression> getDowngradeFilters()
public List<AggregateFunction> getPushDownAggregates()
public boolean hasPushDownAggregate()
public boolean hasPushDownGroupBy()
public boolean isDoubleRead()
public void setIsDoubleRead(boolean isDoubleRead)
isDoubleRead
- if is double readpublic boolean hasIndex()
public TiDAGRequest.PushDownType getPushDownType()
public double getEstimatedCount()
public void setEstimatedCount(double estimatedCount)
public void init(boolean readHandle)
public TiDAGRequest.IndexScanType getIndexScanType()
public TiDAGRequest copy()
public TiDAGRequest copyReqWithPhysicalId(long id)
Copyright © 2024 PingCAP. All rights reserved.