In case it isn't clear, he messed up by making derogatory statement based on someone's caste. He should have known better, especially as an elected representative. He is lucky "Modi" isn't classified as Scheduled Caste/Tribes, rather as "Other backward castes". The provisions of SC/ST act[0] are even more draconian (no anticipatory bail, higher mandatory minimum sentences).
Definitely politically motivated in this case and definitely need to fix the criminal defamation laws, but he needs to be treated the same way a common man would.
[0] https://en.wikipedia.org/wiki/Scheduled_Caste_and_Scheduled_...