The only time I walloped someone at primary school was a girl I had a love hate relationship with- I'd tried to be nice at first but mostly she was a pain in the arse, following me around, copying my work, trying to get me into trouble, saying unpleasant things, not leaving me alone when I asked her to.
We ended up having a fight, she came off worst and went off crying to a dinner lady (lunchtime supervisor)- we were older than your daughter, in Y2 if I recall correctly. I didn't get in trouble as the dinner lady had seen what had been going on. Also it was so out of character for me, I was quiet, polite and diligent and had never been in trouble.
Then her mum complained to the school that I had been bullying her daughter. My teacher didn't think that sounded like me at all but my parents had to come into school anyway and I explained to them what had been happening. The teacher said she would keep us apart, and I was relieved. Her mum wouldn't leave it alone and yelled at me in the playground at drop off - my parents weren't there as I came in with a friend. Apparently I was a spolit brat, a show off, you name it. A grown woman attacking a seven year old.
We went to the same dance class and her mum absolutely launched herself at my mild mannered dad in the corridor after they dropped us off. It's the one and only time I ever saw my dad shout at anyone, he barely even raised his voice normally. It was all jealousy, I think her mum had been dripping bile in her daughter's ear. Why had I got a better part in the play, why was I better in lessons, why was I ahead of her at dancing (because I'd been doing it for three years longer!) Nasty, batshit crazy woman.
Anyway, with that personal experience I would certainly not be inviting this girl round for a playdate and would talk to your daughter about what we do when someone is upsetting or bothering us. Hitting isn't normally on, but I do think we mustn't teach girls, in particular, to "Be kind" and polite in every circumstance, and talk to her about assertiveness, and how a good friend should treat us, and if she thinks this girl is being a good friend to her.