While hunting, Piglins using a crossbow will attempt to attack a Hoglin but the fired arrows do not deal damage and instead bounce off before disappearing. Hoglins do not become hostile, and Piglins will continue to fire until they lose interest in roughly 5-15 shots.
However, Piglins are able to hit each other with the arrows, and melee Piglins can deal damage normally and cause the hit Hoglin to aggro to themself.
Unable to confirm this. It worked for me.