I have a friend who often leaves early and abruptly. He does this in many different situations.
Here is one common example: we met for coffee. After about 30 minutes he said he had to leave in 15 minutes, then after 10 minutes, he left even before I finished my drink.
I find it a bit rude to leave someone just because you finished your food/drink faster. Normally when I invest the time in meeting with someone I would like to spend a couple hours with them.
I thought about acting as if I was surprised, like "aren't you going to wait for me to finish my drink?" I would like to politely ask him to stay without sounding needy and without insulting him.
Is there a way of asking them to agree to a minimum amount of time or to stay longer?
A comment asked "if you had reason to believe that they would stay longer than they did". Where I live it is common to spend a couple of hours when meeting with someone, especially if it's after you have both finished work for the day. Also depending on the activity I think there are implicit expectations. For example if you invite someone to watch a movie with you, they probably would plan to stay until the end and not leave halfway through. When eating or drinking with someone I consider it polite to wait until everyone has finished before leaving. Don't you think it's rude to leave one person behind because they are a slow eater? Another example that actually happened was the same friend invited me to a party where I didn't know anyone. Shortly after I arrived he left. I don't consider this relevant but often times it's him who suggests meeting, for example he asked if I was free to go for coffee. Granted 2 hours is a bit long for coffee, though in this example the first coffee shop was busy and we walked to another one. Though my point was it would be nice if he didn't leave me there before I finished my drink.