The chords stress the flat VII scale degree (C-natural in the key of D major) and frequently involve a major/minor I chord (D/Dm) in the harmony, which consequently evokes either Mixolydian or Dorian modes.
McCartney's guitar solo uses what musicologist Alan W. Pollack describes as "fast triplets, exotic modal touches, and a melodic shape which traverses several octaves and ends with a breathtaking upward flourish" [REF].