@@ -425,8 +425,8 @@ func getTaskPlanCost(t Task, pop *coreusage.PhysicalOptimizeOp) (float64, bool,
425
425
switch t .(type ) {
426
426
case * RootTask :
427
427
taskType = property .RootTaskType
428
- case * copTask : // no need to know whether the task is single-read or double-read, so both CopSingleReadTaskType and CopDoubleReadTaskType are OK
429
- cop := t .(* copTask )
428
+ case * CopTask : // no need to know whether the task is single-read or double-read, so both CopSingleReadTaskType and CopDoubleReadTaskType are OK
429
+ cop := t .(* CopTask )
430
430
if cop .indexPlan != nil && cop .tablePlan != nil { // handle IndexLookup specially
431
431
taskType = property .CopMultiReadTaskType
432
432
// keep compatible with the old cost interface, for CopMultiReadTask, the cost is idxCost + tblCost.
@@ -481,7 +481,7 @@ func getTaskPlanCost(t Task, pop *coreusage.PhysicalOptimizeOp) (float64, bool,
481
481
// It's a very special case for index merge case.
482
482
// t.plan() == nil in index merge COP case, it means indexPlanFinished is false in other words.
483
483
cost := 0.0
484
- copTsk := t .(* copTask )
484
+ copTsk := t .(* CopTask )
485
485
for _ , partialScan := range copTsk .idxMergePartPlans {
486
486
partialCost , err := getPlanCost (partialScan , taskType , coreusage .NewDefaultPlanCostOption ().WithOptimizeTracer (pop ))
487
487
if err != nil {
@@ -1610,7 +1610,7 @@ func (ds *DataSource) convertToIndexMergeScan(prop *property.PhysicalProperty, c
1610
1610
})
1611
1611
path := candidate .path
1612
1612
scans := make ([]PhysicalPlan , 0 , len (path .PartialIndexPaths ))
1613
- cop := & copTask {
1613
+ cop := & CopTask {
1614
1614
indexPlanFinished : false ,
1615
1615
tblColHists : ds .TblColHists ,
1616
1616
}
@@ -2019,7 +2019,7 @@ func (ds *DataSource) convertToIndexScan(prop *property.PhysicalProperty,
2019
2019
}
2020
2020
path := candidate .path
2021
2021
is := ds .getOriginalPhysicalIndexScan (prop , path , candidate .isMatchProp , candidate .path .IsSingleScan )
2022
- cop := & copTask {
2022
+ cop := & CopTask {
2023
2023
indexPlan : is ,
2024
2024
tblColHists : ds .TblColHists ,
2025
2025
tblCols : ds .TblCols ,
@@ -2204,7 +2204,7 @@ func (is *PhysicalIndexScan) initSchema(idxExprCols []*expression.Column, isDoub
2204
2204
is .SetSchema (expression .NewSchema (indexCols ... ))
2205
2205
}
2206
2206
2207
- func (is * PhysicalIndexScan ) addPushedDownSelection (copTask * copTask , p * DataSource , path * util.AccessPath , finalStats * property.StatsInfo ) {
2207
+ func (is * PhysicalIndexScan ) addPushedDownSelection (copTask * CopTask , p * DataSource , path * util.AccessPath , finalStats * property.StatsInfo ) {
2208
2208
// Add filter condition to table plan now.
2209
2209
indexConds , tableConds := path .IndexFilters , path .TableFilters
2210
2210
tableConds , copTask .rootTaskConds = SplitSelCondsWithVirtualColumn (tableConds )
@@ -2477,7 +2477,7 @@ func (ds *DataSource) convertToTableScan(prop *property.PhysicalProperty, candid
2477
2477
// prop.TaskTp is cop related, just return invalidTask.
2478
2478
return invalidTask , nil
2479
2479
}
2480
- copTask := & copTask {
2480
+ copTask := & CopTask {
2481
2481
tablePlan : ts ,
2482
2482
indexPlanFinished : true ,
2483
2483
tblColHists : ds .TblColHists ,
@@ -2711,7 +2711,7 @@ func (ts *PhysicalTableScan) addPushedDownSelectionToMppTask(mpp *MppTask, stats
2711
2711
return mpp
2712
2712
}
2713
2713
2714
- func (ts * PhysicalTableScan ) addPushedDownSelection (copTask * copTask , stats * property.StatsInfo ) {
2714
+ func (ts * PhysicalTableScan ) addPushedDownSelection (copTask * CopTask , stats * property.StatsInfo ) {
2715
2715
ts .filterCondition , copTask .rootTaskConds = SplitSelCondsWithVirtualColumn (ts .filterCondition )
2716
2716
var newRootConds []expression.Expression
2717
2717
ts .filterCondition , newRootConds = expression .PushDownExprs (GetPushDownCtx (ts .SCtx ()), ts .filterCondition , ts .StoreType )
0 commit comments