Denis Shapovalov beat Rafael Nadal 7-6 3-6, 10-6 to take third place in the Mubadala World Tennis Championship.