Normally Thor would simply have killed the dwarf ( as he did to Lit at Balders funeral )and been done with it, but because, in my opinion, it was the Gods who promised his daughter to Alvis, he had to use a little of the wisdom he learned from his father Odin instead to trick the Dark Dwarf.
Thor tells Alvis that if he answers all of his questions he will be deemed worthy to wed his daughter. Thor then goes on to ask question after question for many long hours. At the end the triumphant Alvis thinks he has won, but the sun has risen and the unlucky dwarf is killed.
Alvíss and Þrúðr, illustration by Lorenz Frølich