In fact, it enabled him to rewrite the ending, resulting in the pair staying together.
While Nora Ephron is credited with the screenplay for When Harry Met Sally, Reiner and Billy Crystal both worked on the story as well during production, and this was apparently one of Reiner’s contributions.
They say “write what you know” and apparently what Rob Reiner knew at the time was not living happily ever after with somebody you fell in love with.
However, he tells Entertainment Weekly that, while filming the movie he met the woman who would eventually become his wife and the experienced changed his perception.