That verse is literally a person from a conquered tribe whose children are being brutalized by their captors basically saying he wants them to suffer the same fate as his people
His attitude isn't even condoned, it's just a song someone wrote in the psalms