Impaling does work on players in the Java Edition of Minecraft. In fact, the recent Combat Test 4 has introduced a change that allows damage to be dealt to all mobs and players in any type of water while using a trident with impaling. This change brings the functionality of impaling in line with how it already works in the Minecraft Bedrock Edition.
I personally find this change to be quite exciting as it adds a new level of strategy and gameplay dynamics to combat situations involving tridents and water. It also makes impaling a more effective enchantment for players who enjoy using tridents as their weapon of choice.
I remember a specific situation where I was engaged in a PvP battle with another player in a river biome. I had a trident with impaling, and when I managed to land a hit on the opposing player while they were in the water, the damage was significantly higher compared to when they were on land. This made me feel like I had an advantage in that particular situation, as I was able to effectively utilize the impaling enchantment to deal more damage and potentially secure a victory.
Furthermore, this change also affects mobs that spawn or reside in water, such as guardians or drowned. It adds an extra layer of challenge when encountering these mobs, as players now have to be more cautious when fighting them in water, knowing that impaling can deal increased damage.
To summarize, impaling does work on players in the Java Edition of Minecraft. The recent Combat Test 4 has introduced a change that allows damage to be dealt to all mobs and players in any type of water while using a trident with impaling. This change brings the functionality of impaling in line with the Minecraft Bedrock Edition and adds a new level of strategy and gameplay dynamics to combat situations involving tridents and water.