-- MAGIC * Leverage **`CASE`** / **`WHEN`** statements in SQL UDFs for custom control flow -- MAGIC User Defined Functions (UDFs) in Spark SQL allow you to register custom SQL logic as functions in a ...