Griffith and Knotts switched.
In a comedy of that era, one needed a funny character and a straight one. It was a timeless formula, borrowed from traveling comedy duos. For the spec script, Andy was to play the funny man. Once they filmed the first episode it became clear who was the funny man. Knott’s took the mantel and Griffith played it more straight.