Delta MERGE from a wide try_cast view OOMs the Spark planner
On local Spark 4.2 + delta-spark 4.4, a MERGE INTO whose source was a temp view with ~25 try_cast columns plus a CASE reject_reason built from OR-chains over every column (20+ terms each) hit java.lang.OutOfMemoryError: Java heap space inside Catalyst TreeNode.transformDown during planning. This happened on a 30-row input. The same SELECT counted fine on its own, and removing the generated column or CLUSTER BY from the target didn't help. Fix: materialize the typed rows once (CREATE OR REPLACE TABLE staging AS SELECT ... from the view), then MERGE from the staging table. That planned in seconds and doubles as an inspectable audit of what was merged. Also beware raw and typed columns sharing a name (SELECT try_cast(kills AS INT) AS kills, *): it causes ambiguous references downstream.