code: func (us *UnionScanExec) Next(ctx context.Context, req *chunk.RecordBatch) error {
  	if span := opentracing.SpanFromContext(ctx); span != nil && span.Tracer() != nil {
  		span1 := span.Tracer().StartSpan("unionScan.Next", opentracing.ChildOf(span.Context()))
  		defer span1.Finish()
  	}
  
  	if us.runtimeStats != nil {
  		start := time.Now()
  		defer func() { us.runtimeStats.Record(time.Since(start), req.NumRows()) }()
  	}
  	req.GrowAndReset(us.maxChunkSize)
  	mutableRow := chunk.MutRowFromTypes(us.retTypes())
  	for i, batchSize := 0, req.Capacity(); i < batchSize; i++ {
  		row, err := us.getOneRow(ctx)
  		if err != nil {
  			return err
  		}
  		// no more data.
  		if row == nil {
  			return nil
  		}
  		mutableRow.SetDatums(row...)
  		req.AppendRow(mutableRow.ToRow())
  	}
  	return nil
  }
docs: // Next implements the Executor Next interface.