I believe having a planned ending is good... But then again, it's always best to have the story tell itself.. So it's better to be open to varied ones of the planned one, if that makes sense.
I have written stories, i know the end, but how i may never know when i start writing...
I usually have a general direction the story is going in but it's also very flexible. Sometimes I have no idea how it's going to end up.
You have a complete story in mind,from the beginning. It may twist and turn but usually ends up where you originally Planed.
It's all according to what you're writing. If it's nonfiction, you obviously know the ending, to a degree. If it's fiction, I think it's better to not know the ending until you type it in. That way, it's more fun for you plus more surprising to the reader. :)
There's all kinds