The ending can make or break a movie. I loved the ending of No Country for Old Men. It turned the notion of tying everything up at the end on its head. I'd call it a nice touch of realism. In real life, life goes on. Life is rarely episodic in the manner of TV shows. Some mysteries go unsolved, some criminals are not caught. Life does not always have a showdown. So why should movies? Of course, No Country the film was remarkably faithful to No Country the book which ended the same way.
I thought about movie endings the other day after renting Woody Allen's Cassandra's Dream. I thought the movie was brilliant for the first 100 minutes, then Allen stuck a tidy little 50's film noir ending to it. This did not ruin the entire film for me but it dealt it a severe blow.
Endings should be seamless, not forced in or tacked on. It felt like Allen had a different ending in mind but changed it for a bad reason. What that reason would be is open to speculation. Allen is traditionally a master of ending his films from Manhattan (one of cinema's greatest endings) to Zelig to Small Time Crooks, he knows how to put a period to his work.
Surprise endings are good whether they make you cheer (The Sting) or scream (Carrie) or are of the Usual Suspects I-can't-believe-he-was-Keyser-Soze-but-it-all-makes-sense-now variety.
In the production code era there were less surprises with endings. The bad guy couldn't get away with it which forced some silly endings (The Killing) and unfair ones (Out of the Past) onto really good movies.
Some endings are visually poetic like The Searchers or visually dramatic like Goodfellas. But it is less important for a movie to end beautifully than for it to end sensibly.