I have seen film of German tanks firing on Polish cavalry charging towards them , but it was more a case of the two units running into each other , rather than a futile attack by the Polish cavalry...Where the cavalry was used in an attack they did pretty well...
en.wikipedia.org/wiki/Battle_of_Mokra
The 21st Armoured Battalion under Maj. Stanisław Gliński, equipped mostly with Polish TKS tankettes was ordered to counter-attack the village, along with the cavalry squadron of Captain Jerzy Hollak. In the clouds of smoke of the burning village, the Polish units accidentally drove right in the middle of a German tank column. Although the Polish tankettes were no match for some of the German tanks and the cavalry was very vulnerable to tank fire, the confusion in German ranks prevented the German commander from responding quickly enough. The Polish units managed to break through the German column with negligible losses and seized the forest to the Northwest of Mokra. This manoeuvre is sometimes referred to as a charge of Polish cavalry on German tanks, although no charge was planned nor executed.
The losses on both sides were quite high. The Germans lost approximately 800 men (killed, missing, captured or seriously wounded), and between 100 and 160 AFVs (at least 50 of them tanks). The Polish brigade lost 200 killed and 300 wounded, as well as 300 horses and several guns.