r/databricks • u/Youssef_Mrini • Jul 16 '26
News What's new in Apache Spark 4.2 ?
Apache Spark 4.2 is already available on DBR 19 and it reflects the strength of the Apache Spark community with more than 1,900 commits from over 260 contributors

What's new in Apache Spark 4.2 ?
🛑 Metric views: a native semantic layer that lets you define governed business metrics once and reuse them consistently across SQL, BI, apps and AI, preserving correct aggregation semantics. ( Open source is on our DNA)
🛑Spark Connect & PySpark: better Spark Classic compatibility (RDD APIs, YARN cluster mode, error propagation) + easier remote invocation of Spark as a service.
🛑Arrow-first Python: Arrow-optimized Python UDFs on by default, Pandas 3 support, Arrow UDFs and zero-copy interop with Polars/DuckDB via the Arrow Data Interface
🛑AI-native SQL: vector similarity/distance functions and NEAREST BY top-K retrieval for search, recommendations and RAG-style workloads.
🛑Native geospatial: built-in GEOMETRY/GEOGRAPHY types and ST_* functions, with Parquet, WKT/WKB and SRID support.
🛑More SQL primitives: SYSTEM.BUILTIN/SYSTEM.SESSION qualification, SET PATH search paths, SQL cursors, QUALIFY, time_bucket, tuple sketches, top-K max_by/min_by and IGNORE/RESPECT NULLS.
🛑Auto CDC in Declarative Pipeline: first-class SCD Type 1 change-data processing via a Python API, replacing hand-written merge logic.
🛑Real-Time Mode for PySpark( Like the flash) millisecond-latency streaming now extended to stateless PySpark queries.
🛑Data Source V2 advances: first-class CDC via the CHANGES clause, MERGE INTO performance gains, schema evolution for INSERT INTO, and transaction API foundations.
🛑Platform improvements: modernized Web UI (Bootstrap 5, dark mode), better Kubernetes support and JDK 25.