If a player rolls 33-34 on the wild magic table (maximize damage), what happens if they miss the target on the damaging attack?


On the Wild Magic Sorcerer’s Wild Magic Table, (PHB p.104), getting a roll of 33-34 results in:

Maximize the damage of the next damaging spell you cast within the next minute.

What happens if the sorcerer casts an attack roll spell that deals damage, and misses the target? I am being confused by the term "damaging." Is a "Damaging Spell" a hidden category of spell that can be cast, and thus means casting the spell ends this effect? or does the spell need to apply damage in order to be damaging, and would therefore need to hit for the effect to happen?