| 程序包 | 说明 |
|---|---|
| org.tikv.common | |
| org.tikv.common.meta | |
| org.tikv.common.operation | |
| org.tikv.common.operation.iterator | |
| org.tikv.common.predicates |
| 限定符和类型 | 方法和说明 |
|---|---|
Iterator<Long> |
Snapshot.indexHandleRead(TiDAGRequest dagRequest,
List<RangeSplitter.RegionTask> tasks)
Below is lower level API for env like Spark which already did key range split Perform handle
scan
|
Iterator<TiChunk> |
Snapshot.tableReadChunk(TiDAGRequest dagRequest,
List<RangeSplitter.RegionTask> tasks,
int numOfRows) |
Iterator<Row> |
Snapshot.tableReadRow(TiDAGRequest dagRequest,
long physicalId)
Issue a table read request
|
| 限定符和类型 | 方法和说明 |
|---|---|
TiDAGRequest |
TiDAGRequest.addAggregate(AggregateFunction expr) |
TiDAGRequest |
TiDAGRequest.addFilters(List<Expression> filters) |
TiDAGRequest |
TiDAGRequest.addGroupByItem(ByItem byItem)
add a group by clause to select query
|
TiDAGRequest |
TiDAGRequest.addOrderByItem(ByItem byItem)
add a order by clause to select query.
|
TiDAGRequest |
TiDAGRequest.addRanges(Map<Long,List<Coprocessor.KeyRange>> ranges)
set key range of scan
|
TiDAGRequest |
TiDAGRequest.addRequiredColumn(ColumnRef column)
Field is not support in TiDB yet, for here we simply allow TiColumnRef instead of TiExpr like
in SelectRequest proto
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
|
TiDAGRequest |
TiDAGRequest.Builder.build(TiDAGRequest.PushDownType pushDownType) |
TiDAGRequest |
TiDAGRequest.copy() |
TiDAGRequest |
TiDAGRequest.copyReqWithPhysicalId(long id) |
TiDAGRequest |
TiDAGRequest.setDistinct(boolean distinct) |
TiDAGRequest |
TiDAGRequest.setHaving(Expression having)
set having clause to select query
|
TiDAGRequest |
TiDAGRequest.setIndexInfo(TiIndexInfo indexInfo) |
TiDAGRequest |
TiDAGRequest.setLimit(int limit)
add limit clause to select query.
|
TiDAGRequest |
TiDAGRequest.setPhysicalId(long id) |
TiDAGRequest |
TiDAGRequest.setStartTs(TiTimestamp startTs)
set start timestamp for the transaction
|
TiDAGRequest |
TiDAGRequest.setTableInfo(TiTableInfo tableInfo) |
| 限定符和类型 | 方法和说明 |
|---|---|
static SchemaInfer |
SchemaInfer.create(TiDAGRequest dagRequest) |
static SchemaInfer |
SchemaInfer.create(TiDAGRequest dagRequest,
boolean readHandle) |
| 限定符和类型 | 方法和说明 |
|---|---|
static CoprocessorIterator<Long> |
CoprocessorIterator.getHandleIterator(TiDAGRequest req,
List<RangeSplitter.RegionTask> regionTasks,
TiSession session)
Build a DAGIterator from TiDAGRequest and region tasks to get handles
When we use getHandleIterator, we must be preforming a IndexScan.
|
static CoprocessorIterator<Row> |
CoprocessorIterator.getRowIterator(TiDAGRequest req,
List<RangeSplitter.RegionTask> regionTasks,
TiSession session)
Build a DAGIterator from TiDAGRequest and region tasks to get rows
When we are preforming a scan request using coveringIndex,
IndexScan should be used to read index rows. |
static CoprocessorIterator<TiChunk> |
CoprocessorIterator.getTiChunkIterator(TiDAGRequest req,
List<RangeSplitter.RegionTask> regionTasks,
TiSession session,
int numOfRows)
Build a DAGIterator from TiDAGRequest and region tasks to get rows
When we are preforming a scan request using coveringIndex,
IndexScan should be used to read index rows. |
| 构造器和说明 |
|---|
IndexScanIterator(Snapshot snapshot,
TiDAGRequest req,
Iterator<Long> handleIterator) |
| 限定符和类型 | 方法和说明 |
|---|---|
TiDAGRequest |
TiKVScanAnalyzer.buildTiDAGReq(boolean allowIndexScan,
boolean canUseTiKV,
boolean canUseTiFlash,
List<TiColumnInfo> columnList,
List<Expression> conditions,
TiTableInfo table,
TableStatistics tableStatistics,
TiTimestamp ts,
TiDAGRequest dagRequest) |
TiDAGRequest |
TiKVScanAnalyzer.buildTiDAGReq(List<TiColumnInfo> columnList,
List<Expression> conditions,
TiTableInfo table,
TiTimestamp ts,
TiDAGRequest dagRequest) |
| 限定符和类型 | 方法和说明 |
|---|---|
TiDAGRequest |
TiKVScanAnalyzer.buildTiDAGReq(boolean allowIndexScan,
boolean canUseTiKV,
boolean canUseTiFlash,
List<TiColumnInfo> columnList,
List<Expression> conditions,
TiTableInfo table,
TableStatistics tableStatistics,
TiTimestamp ts,
TiDAGRequest dagRequest) |
TiDAGRequest |
TiKVScanAnalyzer.buildTiDAGReq(List<TiColumnInfo> columnList,
List<Expression> conditions,
TiTableInfo table,
TiTimestamp ts,
TiDAGRequest dagRequest) |
Copyright © 2023 PingCAP. All rights reserved.