If the enemy wasn't knocked out (or killed) instantly it would be awkward to say the least. Also I'm not sure if impale would be the correct word, but english is not my main language so I just went with the vocabulary I have.
It would help if you specified "when". But generally speaking most infantry carried some kind of secondary weapon. It might be a sword, it might be a dagger/knife, or a simple club.
But also it's not just a single person. You're almost certainly in a formation of men, possibly shoulder to shoulder depending on time and place, and relying on your collective wall of spears and will to deter the cavalry. So if your spear is out of service, there should be men on either side still with their spears ready as well as men behind you (possibly multiple ranks depending on the length of the spear).
Lastly I don't think you need to worry about awkward conversations. If a cavalryman's transfixed on your spear, he's probably not up for conversation and more likely dead or screaming in pain.