Here is the sentence:
During a commercial break, Rodney let in the dog, who had been whining pitifully
out in the rain.
Nice work, grammar brain! Who had been whining pitifully out in the rain, an adjective clause, is right next to dog, its logical target.