'How to implement multimap_agg in spark sql

Can anyone help in providing the solution how multimap_agg in SQL can be used in spark sql



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source