That’s not a comparison, it’s an equation. A comparison identifies a difference. An equation asserts similarity.
I think you mean it’s a metaphor. An equation is a mathematical thing and doesn’t make sense in discourse, unless you mean equivalents but that also doesn’t make sense in the context.
Equations exist in discourse. Watch, I’ll make an equation, which is to say I’ll equate two things:
Childish Gambino is Donald Glover.
Boom. That’s an equation. I equated Childish Gambino with Donald Glover. I didn’t compare them, because I didn’t say they’re different. I said they’re the same, which is equating them.