code: func (e *TableReaderExecutor) Open(ctx context.Context) error {
  	var err error
  	if e.corColInFilter {
  		e.dagPB.Executors, _, err = constructDistExec(e.ctx, e.plans)
  		if err != nil {
  			return err
  		}
  	}
  	if e.runtimeStats != nil {
  		collExec := true
  		e.dagPB.CollectExecutionSummaries = &collExec
  	}
  	if e.corColInAccess {
  		ts := e.plans[0].(*plannercore.PhysicalTableScan)
  		access := ts.AccessCondition
  		pkTP := ts.Table.GetPkColInfo().FieldType
  		e.ranges, err = ranger.BuildTableRange(access, e.ctx.GetSessionVars().StmtCtx, &pkTP)
  		if err != nil {
  			return err
  		}
  	}
  
  	e.resultHandler = &tableResultHandler{}
  	if e.feedback != nil && e.feedback.Hist != nil {
  		// EncodeInt don't need *statement.Context.
  		e.ranges = e.feedback.Hist.SplitRange(nil, e.ranges, false)
  	}
  	firstPartRanges, secondPartRanges := splitRanges(e.ranges, e.keepOrder, e.desc)
  	firstResult, err := e.buildResp(ctx, firstPartRanges)
  	if err != nil {
  		e.feedback.Invalidate()
  		return err
  	}
  	if len(secondPartRanges) == 0 {
  		e.resultHandler.open(nil, firstResult)
  		return nil
  	}
  	var secondResult distsql.SelectResult
  	secondResult, err = e.buildResp(ctx, secondPartRanges)
  	if err != nil {
  		e.feedback.Invalidate()
  		return err
  	}
  	e.resultHandler.open(firstResult, secondResult)
  	return nil
  }
docs: // Open initialzes necessary variables for using this executor.