Neither of the rules you suggest is absolute; both are merely guidelines. Much depends on the writer, the publishing house's punctuation rules, the complexity of the sentence, and the variety of English.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.