Ex to funeral

I recently made a post but realized I couldn't post anonymously in the other section so I will post here. This is simply a question that I would like to hear others opinions on. Thanks.

My question was: Is it okay for an ex bf or gf to attend a family funeral service if your relationship with him or her was constantly on and off and they treated you like sh**? This was a relationship when you were 20, still young and naive. Now years later you have moved on and found happiness with someone you can trust and respects you for what you are. You have not seen nor heard from him or her since then and suddenly the ex shows up at one of your family's funeral service. The ex also hasn't had any communication or contact with your family either since they were never around the family but the ex heard from people and decides to show up. How would you feel and are you okay with that?