Pair your devices with a code and playback position follows you: pause on this device, hit resume on the other. Position is saved to the site every minute and on pause.
Open this panel on your other device and enter the same code.
Starts this lesson and continues through 0 more to the end of the course.
Every page below was fetched on 2026-11-22. If your picture of Spark is "3.5, and 4.0 just came out", you are four feature releases behind: the news page lists 4.3.0 (October 30, 2026), 4.2.1, 4.1.4, 4.0.5 and 3.5.10 as the newest of each line (news, verified 2026-11-22). A lead who is asked "should we move to Spark 4?" and answers with features has answered the wrong question. The right answer is a list of defaults that changed, the configs that put them back, and the order you would remove those configs.
What the posting is really asking. "Stay updated with the latest trends and advancements in Apache Spark, Scala, and Python technologies" is not a reading habit. It is the ability to say which release your platform runs, which one upstream ships, what breaks in between, and what you would do about it this quarter. Pair it with "ensure adherence to best practices in … deployment processes": an upgrade is a deployment, and it is the one a lead owns end to end.
Dates from the news page; headlines in the release notes' own wording.
| Release | Date | Headline items, as the notes word them |
|---|---|---|
| 4.0.0 | May 23, 2025 | "Drop Scala 2.12 and make Scala 2.13 the default", "Drop JDK 8/11 and make JDK 17 the default", "Use ANSI SQL mode by default", "Add VARIANT data type", "SQL Pipe syntax", "Support SQL user-defined functions", "Python Data Source API", "Python User-defined Table Functions", "Arbitrary State API v2", "State Data Source - Reader" |
| 4.1.0 | December 16, 2025 | "Declarative Pipelines, a new component to define and run data pipelines", "SQL Scripting GA", "VARIANT type GA", "Real-time Mode in Structured Streaming (Scala stateless support)", "JDBC Driver for Spark Connect", "Python Arrow UDF", "Python Arrow UDTF", "Recursive CTE support" |
| 4.2.0 | July 14, 2026 | "Geospatial types", "Change Data Capture — a SQL CHANGES clause", "Enable Arrow-optimized Python UDFs and Arrow-based PySpark IPC by default", "Add QUALIFY clause", "Metric views", "Build and run Spark on Java 25" |
| 4.3.0 | October 30, 2026 | "Stateful Real-Time Mode", "SCD Type 2 in Auto CDC", "Faster queries on small data", "Spark Connect REST endpoints", "JSON_TABLE and VARIANT transformation functions", "SQL ASOF JOIN", "Nanosecond-precision timestamps … (preview)" |
⚠️ The 4.1.0 notes live at spark-release-4.1.0.html (dots); the hyphenated URL returned HTTP 404
on 2026-11-22. Follow the link from the news page.
The versioning policy (verified 2026-11-22) changed with 4.3, and this is the part most people have not caught up on:
⚠️ The policy page gives no end-of-life date per line. It states the window for 4.2.x and for
3.5.x; it does not state when 4.0.x or 4.1.x stop receiving fixes. Do not put an EOL date for those
in a planning document — check the dev@ release threads.
⚠️ Policy and practice disagree. The policy says feature releases carry "No behavior or semantic
changes (e.g. SQL semantics, execution behavior, configuration defaults)". The 4.3 migration guides
nevertheless list changed defaults — spark.rdd.compress, spark.sql.execution.replaceHashWithSortAgg
— and the 4.3.0 notes list "Drop Python 3.10 support". Read the migration guide for every feature
release; do not rely on the policy sentence.
What a lead does with this: 4.3 is a six-month release. For a platform you intend to leave alone for a year, the documented long-window targets are 4.2.x (18 months) or the future 4.5 LTS. Bring that to stakeholders with the quotes above.
All quotes are from the migration guides (SQL, Core, PySpark, Structured Streaming, verified 2026-11-22).
| Change in 4.0 | The guide's restore line |
|---|---|
"spark.sql.ansi.enabled is on by default" |
"set spark.sql.ansi.enabled to false or SPARK_ANSI_SQL_MODE to false" |
CREATE TABLE without USING/STORED AS uses spark.sql.sources.default, not Hive |
"set spark.sql.legacy.createHiveTableByDefault to true" |
spark.sql.maxSinglePartitionBytes default: Long.MaxValue → 128m |
set it to 9223372036854775807 |
spark.sql.orc.compression.codec default: snappy → zstd |
set it to snappy |
spark.sql.legacy.timeParserPolicy default: EXCEPTION → CORRECTED |
— (set the policy explicitly) |
| JDBC type mappings changed for Postgres, MySQL, Oracle, SQL Server, DB2 | per-dialect, e.g. spark.sql.legacy.postgres.datetimeMapping.enabled |
Servlet API "from javax to jakarta" |
none — recompile |
| "support for Apache Mesos as a resource manager was removed" | none |
Platform floor, from the 4.0.0 notes and the
4.3.0 docs overview: Scala 2.12 dropped, JDK 8/11 dropped;
today "Spark runs on Java 17/21/25, Scala 2.13, Python 3.11+, and R 4.0+ (Deprecated)", and "When
using the Scala API, it is necessary for applications to use the same version of Scala that Spark was
compiled for." Every Scala jar and every _2.12 dependency must be rebuilt for _2.13, and no
config restores that.
Python floor moved at every release (PySpark migration guide):
| Release | Python dropped | pandas minimum | PyArrow minimum |
|---|---|---|---|
| 4.0 | 3.8 | 1.0.5 → 2.0.0 | 4.0.0 → 11.0.0 |
| 4.1 | 3.9 | 2.0.0 → 2.2.0 | 11.0.0 → 15.0.0 |
| 4.2 | — | — | 15.0.0 → 18.0.0 |
| 4.3 | 3.10 | — | — |
The 4.3.0 install page
lists "Python 3.11 and above", pandas >=2.2.0,<3.0.0, pyarrow >=18.0.0. Also in 4.0, pandas API
on Spark lost a long list of deprecated methods (DataFrame.append, iteritems, to_koalas, …).
Scratch environment: PySpark 4.3.0, Python 3.14.7, Scala 2.13.18, Java 17.0.18, local mode. Executed 2026-11-22; the output is what the machine printed.
def attempt(label, sql):
try:
print(f"{label}: {spark.sql(sql).collect()[0][0]!r}")
except Exception as e:
print(f"{label}: {type(e).__name__} condition={e.getCondition()} sqlstate={e.getSqlState()}")
qs = [("overflow", "SELECT 2147483647 + 1"), ("cast", "SELECT CAST('12x' AS INT)"),
("divide", "SELECT 10 / 0"), ("array", "SELECT array(1,2,3)[5]")]
for l, q in qs: attempt(l, q) # ANSI on — the default
spark.conf.set("spark.sql.ansi.enabled", "false")
for l, q in qs: attempt(l, q) # 3.5 behaviour
overflow: ArithmeticException condition=ARITHMETIC_OVERFLOW sqlstate=22003
cast: NumberFormatException condition=CAST_INVALID_INPUT sqlstate=22018
divide: ArithmeticException condition=DIVIDE_BY_ZERO sqlstate=22012
array: ArrayIndexOutOfBoundsException condition=INVALID_ARRAY_INDEX sqlstate=22003
# -- after spark.conf.set("spark.sql.ansi.enabled", "false") -- (this comment line is mine)
overflow: -2147483648
cast: None
divide: None
array: None
With ANSI back on, try_add(2147483647, 1), try_cast('12x' AS INT), try_divide(10, 0) and
try_element_at(array(1,2,3), 5) each returned NULL. The same holds from Scala (spark-shell, same
machine): $"s".cast("int") over "12x" threw SparkNumberFormatException CAST_INVALID_INPUT 22018;
$"s".try_cast("int") returned [12], [null].
⚠️ Read the second half again. With ANSI off, an integer overflow wrapped to a negative number
and a bad cast became NULL — silently. ANSI does not introduce failures; it surfaces corruption
that was already being written. A job that "worked on 3.5 and fails on 4.0" has told you where it
was wrong.
What a lead does with this: in review, treat a session-wide spark.sql.ansi.enabled=false in
new code as a defect. The fix is a try_* function at the one expression where NULL on bad input
is the intended rule, plus a count of the rows that took that path.
Strictly from each release's notes and migration guides.
4.1.0. Spark Declarative Pipelines — "you define datasets and queries, and Spark handles the
execution graph, dependency ordering, parallelism, checkpoints, and retries." Real-Time Mode, "Scala
stateless support". SQL scripting "GA and enabled by default". VARIANT "GA with shredding". "New
Arrow-native UDF and UDTF decorators", "Python Data Source filter pushdown", "Spark ML on Connect is
GA for the Python client". Build: Scala 2.13.17, "Add Python 3.14 support in Spark Classic". Changed
defaults: magic committer "for all S3 buckets by default", AQE for stateless streaming
(spark.sql.adaptive.streaming.stateless.enabled), and BinaryType maps to Python bytes
(spark.sql.execution.pyspark.binaryAsBytes).
4.2.0. The one that changes every PySpark job: spark.sql.execution.arrow.pyspark.enabled,
spark.sql.execution.pythonUDF.arrow.enabled and spark.sql.execution.pythonUDTF.arrow.enabled all
"now default to true"; set each to false to restore. A pandas UDF receiving a nullable integer
column with nulls now gets Int64-family extension dtypes "instead of float64". Also: GEOMETRY and
GEOGRAPHY types, the CHANGES clause and Auto CDC "SCD Type 1" in pipelines, QUALIFY, "Add
Real-time Mode (RTM) trigger support to PySpark", DataStreamReader.name() so "sources can be
added, removed, and reordered without breaking checkpoints", Java 25. For what Arrow-optimised UDFs
are, see PS0 lesson 3.
4.3.0. Real-Time Mode goes stateful — "streaming aggregation, dropDuplicates, and
transformWithState … with end-to-end latency on the order of 100 milliseconds" — and loses its
@Experimental annotation. SCD Type 2 in Auto CDC. Opt-in: single-task execution
(spark.sql.optimizer.singleTaskExecution.enabled), SQL ASOF JOIN
(spark.sql.join.asofJoin.enabled, "off by default"), nanosecond timestamps
(spark.sql.timestampNanosTypes.enabled). variant_set / variant_insert / variant_delete,
JSON_TABLE. Changed defaults: spark.rdd.compress,
spark.sql.execution.replaceHashWithSortAgg and spark.sql.execution.combineAdjacentAggregation
are true. One rename fails silently: the AQE rule DynamicJoinSelection is now
DemoteBroadcastHashJoin, and if you had it in spark.sql.adaptive.optimizer.excludedRules, "that
name no longer matches any rule (unknown names are silently ignored)". Grep your configs for it.
spark.sql("""SELECT parse_json('{"user":{"id":7,"tags":["a","b"]},"amount":12.5}') AS v""") \
.createOrReplaceTempView("ev")
spark.sql("""SELECT typeof(v) t, variant_get(v, '$.user.id', 'int') AS id,
v:user.tags[1]::string AS tag, schema_of_variant(v) s FROM ev""").show(truncate=False)
spark.sql("SELECT variant_set(v, '$.user.id', 8) AS v2 FROM ev").show(truncate=False)
Data rows only, borders and headers trimmed:
|variant|7 |b |OBJECT<amount: DECIMAL(3,1), user: OBJECT<id: BIGINT, tags: ARRAY<STRING>>>|
|{"amount":12.5,"user":{"id":8,"tags":["a","b"]}}|
The VARIANT type is 4.0, the colon operator 4.1, variant_set 4.3 — three releases in one query.
Also run, same session: a SQL script (BEGIN … DECLARE … WHILE … END) summing 1 to 4 returned 10;
a pipe query (FROM t |> WHERE … |> AGGREGATE …), a QUALIFY query and a WITH RECURSIVE CTE all
returned rows; and a plain @udf("int") planned as ArrowEvalPython with no configuration,
confirming the 4.2 default.
scala-lang.org/download/all (verified 2026-11-22): "Current 3.10.x release: 3.10.1" (November 11, 2026), "Current 3.9.x LTS release: 3.9.0", "Current 3.3.x LTS release: 3.3.9", "Current 2.13.x release: 2.13.18" (November 24, 2025), "Latest 2.12.x maintenance release: 2.12.21". Spark's docs name Scala 2.13 only, and the scratch 4.3.0 build reports 2.13.18. On a Spark team "Scala" still means 2.13.
Python: 3.11 and above per the docs. On this machine PySpark 4.3.0 ran every sample on Python
3.14.7 — an observation, not a support statement. The same environment has pandas 3.1.1, outside
the documented <3.0.0; PySpark warned "PySpark does not yet fully support pandas >= 3.0.0" and
the samples still ran. Pin pandas below 3 on a real cluster.
| Service | Newest version | Spark | Source (verified 2026-11-22) |
|---|---|---|---|
| AWS Glue | 6.0 — "the default version for jobs created without specifying an AWS Glue version" | 4.1.1, Python 3.13, Scala 2.13.17, Java 17 | Glue versions |
| Amazon EMR 8.x — "AWS runtime for Apache Spark" | emr-spark-8.2.0 — LTS, initial release November 18, 2026, standard support until November 17, 2029 |
4.1.3-amzn-0 | emr-spark-8.2.0 |
| Amazon EMR 7.x | 7.14.0 — "latest release of 7.x series", initial release September 8, 2026 | 3.5.8-amzn-0 | EMR 7.14.0 |
Upstream is 4.3.0. Both Glue 6.0 and the EMR 8.x runtime are on the 4.1 line — two feature releases behind — and the classic EMR 7.x labels are still on 3.5. So on AWS today you get ANSI-by-default, Declarative Pipelines and stateless Real-Time Mode, and you do not get the 4.2 Arrow defaults or 4.3's stateful Real-Time Mode.
⚠️ The EMR docs are easy to misread here. The
release-components page
lists only the 7.x, 6.x and 5.x series, so reading that page alone you would conclude "EMR has no
Spark 4". The Spark 4 runtime is documented separately, with labels of the form emr-spark-x.y.z,
and it heads the
EMR Serverless release list
above 7.14.0. Check both before you answer a version question. Lesson 5 covers deployment;
DE4 lesson 1 covers Glue
versus EMR.
Sources to watch, in order of signal.
dev@spark.apache.org, and the vote needs "at least 3 +1 votes from
PMC members and no -1 votes"
(improvement proposals). Declarative
Pipelines and Real-Time Mode were SPIPs before they were release notes.dev@spark.apache.org, "for people who want to contribute code", where release windows are
discussed; user@ is "for usage questions, help, and announcements"
(community).Running the upgrade.
In an interview, answer "how do you stay current" with specifics: the release you run, the one upstream ships, one default that changed between them with its config key, and what you did about it. "I read blogs" names nothing.
ARITHMETIC_OVERFLOW. What was it doing on 3.5?spark-defaults.conf excludes DynamicJoinSelection. What happens on 4.3?spark.sql.ansi.enabled=false the scratch run returned
-2147483648 for 2147483647 + 1. The failure is new; the wrong number is not.spark.sql.execution.arrow.pyspark.enabled and the two UDF/UDTF
keys), and nullable integer columns with nulls arrive as Int64-family extension dtypes
"instead of float64".DemoteBroadcastHashJoin and "unknown names are silently
ignored", so the exclusion stops applying. The guide points to
spark.sql.adaptive.convertSortMergeJoinToShuffledHashJoin.enabled.-2147483648 and ask who
has a SUM over an INT column in production. Then run the VARIANT query and have the room
attribute each function to its release.spark.sql.ansi.enabled=false?" The right
answer is "temporarily, with a removal date" — push back on both "never" and "permanently".