<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://openlakehouse.io/w/index.php?action=history&amp;feed=atom&amp;title=Project_Tungsten</id>
	<title>Project Tungsten - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://openlakehouse.io/w/index.php?action=history&amp;feed=atom&amp;title=Project_Tungsten"/>
	<link rel="alternate" type="text/html" href="https://openlakehouse.io/w/index.php?title=Project_Tungsten&amp;action=history"/>
	<updated>2026-12-06T00:07:56Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://openlakehouse.io/w/index.php?title=Project_Tungsten&amp;diff=115&amp;oldid=prev</id>
		<title>Open Lakehouse Wiki sync: Sync from open-lakehouse/wiki@10e58e6</title>
		<link rel="alternate" type="text/html" href="https://openlakehouse.io/w/index.php?title=Project_Tungsten&amp;diff=115&amp;oldid=prev"/>
		<updated>2026-11-23T00:58:00Z</updated>

		<summary type="html">&lt;p&gt;Sync from open-lakehouse/wiki@10e58e6&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 00:58, 23 November 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l31&quot;&gt;Line 31:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 31:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== The &amp;lt;code&amp;gt;spark.sql.tungsten.enabled&amp;lt;/code&amp;gt; flag ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== The &amp;lt;code&amp;gt;spark.sql.tungsten.enabled&amp;lt;/code&amp;gt; flag ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The one Tungsten item that was deprecated is a configuration flag. In Spark 1.5.0, &amp;lt;code&amp;gt;spark.sql.tungsten.enabled&amp;lt;/code&amp;gt; (default true) switched the Tungsten execution backend and code generation on or off.&amp;lt;ref name=&quot;r150&quot; /&amp;gt;&amp;lt;ref&amp;gt;{{Cite web |url=https://github.com/apache/spark/blob/v1.5.0/sql/core/src/main/scala/org/apache/spark/sql/SQLConf.scala |title=SQLConf.scala (v1.5.0) |publisher=Apache Software Foundation |access-date=2026-11-22}}&amp;lt;/ref&amp;gt; Spark 1.6.0 moved &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;it &lt;/del&gt;to a list of deprecated keys: setting it logged a warning that the property &quot;is deprecated and will be ignored. Tungsten will continue to be used.&quot;&amp;lt;ref&amp;gt;{{Cite web |url=https://github.com/apache/spark/blob/v1.6.0/sql/core/src/main/scala/org/apache/spark/sql/execution/commands.scala |title=commands.scala (v1.6.0) |publisher=Apache Software Foundation |access-date=2026-11-22}}&amp;lt;/ref&amp;gt; By Spark 2.0.0 the &amp;lt;code&amp;gt;SET&amp;lt;/code&amp;gt; command no longer has any special handling for it.&amp;lt;ref&amp;gt;{{Cite web |url=https://github.com/apache/spark/blob/v2.0.0/sql/core/src/main/scala/org/apache/spark/sql/execution/command/SetCommand.scala |title=SetCommand.scala (v2.0.0) |publisher=Apache Software Foundation |access-date=2026-11-22}}&amp;lt;/ref&amp;gt; There has been no way to turn Tungsten off as a whole since 1.6.0.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The one Tungsten item that was deprecated is a configuration flag. In Spark 1.5.0, &amp;lt;code&amp;gt;spark.sql.tungsten.enabled&amp;lt;/code&amp;gt; (default true) switched the Tungsten execution backend and code generation on or off.&amp;lt;ref name=&quot;r150&quot; /&amp;gt;&amp;lt;ref&amp;gt;{{Cite web |url=https://github.com/apache/spark/blob/v1.5.0/sql/core/src/main/scala/org/apache/spark/sql/SQLConf.scala |title=SQLConf.scala (v1.5.0) |publisher=Apache Software Foundation |access-date=2026-11-22}}&amp;lt;/ref&amp;gt; Spark 1.6.0 &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;removed the option to turn off the unsafe (Tungsten) and code generation paths (SPARK-11644)&amp;lt;ref&amp;gt;{{Cite web |url=https://issues.apache.org/jira/browse/SPARK-11644 |title=SPARK-11644: Remove the option to turn off unsafe and codegen |publisher=Apache Software Foundation JIRA |access-date=2026-11-22}}&amp;lt;/ref&amp;gt; and &lt;/ins&gt;moved &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;the flag &lt;/ins&gt;to a list of deprecated keys: setting it logged a warning that the property &quot;is deprecated and will be ignored. Tungsten will continue to be used.&quot;&amp;lt;ref&amp;gt;{{Cite web |url=https://github.com/apache/spark/blob/v1.6.0/sql/core/src/main/scala/org/apache/spark/sql/execution/commands.scala |title=commands.scala (v1.6.0) |publisher=Apache Software Foundation |access-date=2026-11-22}}&amp;lt;/ref&amp;gt; By Spark 2.0.0 the &amp;lt;code&amp;gt;SET&amp;lt;/code&amp;gt; command no longer has any special handling for it.&amp;lt;ref&amp;gt;{{Cite web |url=https://github.com/apache/spark/blob/v2.0.0/sql/core/src/main/scala/org/apache/spark/sql/execution/command/SetCommand.scala |title=SetCommand.scala (v2.0.0) |publisher=Apache Software Foundation |access-date=2026-11-22}}&amp;lt;/ref&amp;gt; There has been no way to turn Tungsten off as a whole since 1.6.0.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Example ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Example ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki:diff:1.41:old-101:rev-115:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Open Lakehouse Wiki sync</name></author>
	</entry>
	<entry>
		<id>https://openlakehouse.io/w/index.php?title=Project_Tungsten&amp;diff=101&amp;oldid=prev</id>
		<title>Open Lakehouse Wiki sync: Sync from open-lakehouse/wiki@f2492a3</title>
		<link rel="alternate" type="text/html" href="https://openlakehouse.io/w/index.php?title=Project_Tungsten&amp;diff=101&amp;oldid=prev"/>
		<updated>2026-11-23T00:34:53Z</updated>

		<summary type="html">&lt;p&gt;Sync from open-lakehouse/wiki@f2492a3&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Infobox concept&lt;br /&gt;
| name            = Project Tungsten&lt;br /&gt;
| also_known_as   = Tungsten, Tungsten execution engine&lt;br /&gt;
| field           = Query execution performance&lt;br /&gt;
| introduced      = Spark 1.4.0 (first pieces); phase 1 completed in Spark 1.5.0&lt;br /&gt;
| key_parts       = Explicit (on-heap or off-heap) memory management, &amp;lt;code&amp;gt;UnsafeRow&amp;lt;/code&amp;gt; binary row format, cache-aware sorting and hashing, code generation including whole-stage code generation&lt;br /&gt;
| implementations = [[Apache Spark]]&lt;br /&gt;
| related         = [[Catalyst optimizer]], [[Whole-stage code generation]], [[Executor]], [[Shuffle]], [[Native execution engine (Spark)]]&lt;br /&gt;
}}&lt;br /&gt;
{{Verified|2026-11-22|SPARK-7075, SPARK-7081, SPARK-9697, SPARK-10708 and SPARK-12795, the Spark 1.4.0, 1.5.0 and 2.0.0 release notes, the v1.5.0, v1.6.0, v2.0.0 and v4.3.0 tags of apache/spark (SQLConf, SetCommand, SparkEnv, ShuffleManager, MemoryManager, TaskMemoryManager, UnsafeRow, WholeStageCodegenExec, docs/configuration.md) and EXPLAIN output from a Spark 4.3 build}}&lt;br /&gt;
{{Status|active |note=Project Tungsten is not deprecated in any Spark release. It was a performance initiative, not a feature with an on/off switch; its code is the default execution path in Spark 4.3.0. Only its old configuration flag, &amp;lt;code&amp;gt;spark.sql.tungsten.enabled&amp;lt;/code&amp;gt;, was deprecated (Spark 1.6.0) and later dropped. |ref=&amp;lt;ref name=&amp;quot;mm430&amp;quot;&amp;gt;{{Cite web |url=https://github.com/apache/spark/blob/v4.3.0/core/src/main/scala/org/apache/spark/memory/MemoryManager.scala |title=MemoryManager.scala (v4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-22}}&amp;lt;/ref&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Project Tungsten&amp;#039;&amp;#039;&amp;#039; is the name of an [[Apache Spark]] engineering initiative, started in 2015, to make Spark&amp;#039;s execution more efficient in CPU and memory by managing memory explicitly, storing rows in a compact binary format, using CPU caches better and generating code at run time.&amp;lt;ref name=&amp;quot;jira7075&amp;quot;&amp;gt;{{Cite web |url=https://issues.apache.org/jira/browse/SPARK-7075 |title=SPARK-7075: Project Tungsten (Spark 1.5 Phase 1) |publisher=Apache Software Foundation JIRA |access-date=2026-11-22}}&amp;lt;/ref&amp;gt; Tungsten is not a separate engine or a module that can be installed or turned off: its results (for example the &amp;lt;code&amp;gt;UnsafeRow&amp;lt;/code&amp;gt; format, Tungsten-managed memory pages and whole-stage code generation) are part of how Spark SQL and DataFrame queries run in every current release. The name survives mostly in source code, configuration aliases and older documentation.&lt;br /&gt;
&lt;br /&gt;
== What the name referred to ==&lt;br /&gt;
The umbrella ticket SPARK-7075, &amp;quot;Project Tungsten (Spark 1.5 Phase 1)&amp;quot;, states the premise: most Spark workloads observed by its authors were bottlenecked by CPU and memory rather than by I/O or network. It names three areas of work:&amp;lt;ref name=&amp;quot;jira7075&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;blog2015&amp;quot;&amp;gt;{{Cite web |url=https://www.databricks.com/blog/2015/04/28/project-tungsten-bringing-spark-closer-to-bare-metal.html |title=Project Tungsten: Bringing Apache Spark Closer to Bare Metal |publisher=Databricks |date=2015-04-28 |access-date=2026-11-22}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Memory management and binary processing.&amp;#039;&amp;#039;&amp;#039; Keep data in a binary format instead of as Java objects, to reduce garbage collection overhead and memory use; account for memory in bytes; and let operators that know the data types work directly on the binary data without serialization.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Cache-aware computation.&amp;#039;&amp;#039;&amp;#039; Algorithms and data structures, such as sorting and hashing, laid out to make better use of CPU caches.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Code generation.&amp;#039;&amp;#039;&amp;#039; Generate code at run time for expression evaluation and serialization, to use modern compilers and CPUs better.&lt;br /&gt;
&lt;br /&gt;
The work arrived over several releases. The Spark 1.4.0 release notes list SPARK-7081, a faster sort-based shuffle path, as &amp;quot;Initial performance improvements in project Tungsten&amp;quot;.&amp;lt;ref name=&amp;quot;r140&amp;quot;&amp;gt;{{Cite web |url=https://spark.apache.org/releases/spark-release-1-4-0.html |title=Spark Release 1.4.0 |publisher=Apache Software Foundation |access-date=2026-11-22}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Cite web |url=https://issues.apache.org/jira/browse/SPARK-7081 |title=SPARK-7081: Faster sort-based shuffle path using binary processing cache-aware sort |publisher=Apache Software Foundation JIRA |access-date=2026-11-22}}&amp;lt;/ref&amp;gt; Phase 1 (SPARK-7075) has fix version 1.5.0, and the 1.5.0 release notes say that optimized execution with manually managed memory (Tungsten) was now on by default, together with code generation for expression evaluation.&amp;lt;ref name=&amp;quot;jira7075&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;r150&amp;quot;&amp;gt;{{Cite web |url=https://spark.apache.org/releases/spark-release-1-5-0.html |title=Spark Release 1.5.0 |publisher=Apache Software Foundation |access-date=2026-11-22}}&amp;lt;/ref&amp;gt; A phase 2 umbrella followed (SPARK-9697).&amp;lt;ref&amp;gt;{{Cite web |url=https://issues.apache.org/jira/browse/SPARK-9697 |title=SPARK-9697: Project Tungsten (Phase 2) |publisher=Apache Software Foundation JIRA |access-date=2026-11-22}}&amp;lt;/ref&amp;gt; Whole-stage code generation (SPARK-12795) shipped in Spark 2.0.0, and a 2016 Databricks post by Spark developers presented it as the core of a &amp;quot;second generation Tungsten engine&amp;quot;.&amp;lt;ref name=&amp;quot;jira12795&amp;quot;&amp;gt;{{Cite web |url=https://issues.apache.org/jira/browse/SPARK-12795 |title=SPARK-12795: Whole stage codegen |publisher=Apache Software Foundation JIRA |access-date=2026-11-22}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;blog2016&amp;quot;&amp;gt;{{Cite web |url=https://www.databricks.com/blog/2016/05/23/apache-spark-as-a-compiler-joining-a-billion-rows-per-second-on-a-laptop.html |title=Apache Spark as a Compiler: Joining a Billion Rows per Second on a Laptop |publisher=Databricks |date=2016-05-23 |access-date=2026-11-22}}&amp;lt;/ref&amp;gt; The Spark 2.0.0 release notes describe whole-stage code generation without using the Tungsten name.&amp;lt;ref&amp;gt;{{Cite web |url=https://spark.apache.org/releases/spark-release-2-0-0.html |title=Spark Release 2.0.0 |publisher=Apache Software Foundation |access-date=2026-11-22}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== What remains in Spark 4 ==&lt;br /&gt;
Project Tungsten has no deprecation or removal in any Spark release. Its pieces are ordinary parts of the engine:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Tungsten memory.&amp;#039;&amp;#039;&amp;#039; Spark&amp;#039;s memory manager still allocates &amp;quot;Tungsten&amp;quot; memory pages for sorting, hashing and shuffle, on the JVM heap by default or off-heap through &amp;lt;code&amp;gt;sun.misc.Unsafe&amp;lt;/code&amp;gt; when &amp;lt;code&amp;gt;spark.memory.offHeap.enabled&amp;lt;/code&amp;gt; is true (default false, available since 1.6.0).&amp;lt;ref name=&amp;quot;mm430&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;tmm430&amp;quot;&amp;gt;{{Cite web |url=https://github.com/apache/spark/blob/v4.3.0/core/src/main/java/org/apache/spark/memory/TaskMemoryManager.java |title=TaskMemoryManager.java (v4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-22}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;conf430&amp;quot;&amp;gt;{{Cite web |url=https://github.com/apache/spark/blob/v4.3.0/docs/configuration.md |title=Spark Configuration (docs/configuration.md at v4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-22}}&amp;lt;/ref&amp;gt; See [[Spark memory management]].&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;The &amp;lt;code&amp;gt;UnsafeRow&amp;lt;/code&amp;gt; format.&amp;#039;&amp;#039;&amp;#039; Spark SQL&amp;#039;s internal row format is backed by raw memory instead of Java objects: a null-tracking bit set, one 8-byte word per field, and a variable-length region for strings and other variable-length values.&amp;lt;ref name=&amp;quot;unsaferow&amp;quot;&amp;gt;{{Cite web |url=https://github.com/apache/spark/blob/v4.3.0/sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/UnsafeRow.java |title=UnsafeRow.java (v4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-22}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Whole-stage code generation.&amp;#039;&amp;#039;&amp;#039; Enabled by default through the internal setting &amp;lt;code&amp;gt;spark.sql.codegen.wholeStage&amp;lt;/code&amp;gt; (default true, since 2.0.0). In &amp;lt;code&amp;gt;EXPLAIN&amp;lt;/code&amp;gt; output, an operator compiled into a generated stage is prefixed with &amp;lt;code&amp;gt;*(n)&amp;lt;/code&amp;gt;, where n is the code generation stage ID.&amp;lt;ref name=&amp;quot;sqlconf430&amp;quot;&amp;gt;{{Cite web |url=https://github.com/apache/spark/blob/v4.3.0/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala |title=SQLConf.scala (v4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-22}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;wscg430&amp;quot;&amp;gt;{{Cite web |url=https://github.com/apache/spark/blob/v4.3.0/sql/core/src/main/scala/org/apache/spark/sql/execution/WholeStageCodegenExec.scala |title=WholeStageCodegenExec.scala (v4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-22}}&amp;lt;/ref&amp;gt; See [[Whole-stage code generation]].&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;The &amp;lt;code&amp;gt;tungsten-sort&amp;lt;/code&amp;gt; shuffle alias.&amp;#039;&amp;#039;&amp;#039; Spark 1.5.0 mapped &amp;lt;code&amp;gt;spark.shuffle.manager=tungsten-sort&amp;lt;/code&amp;gt; to a separate &amp;lt;code&amp;gt;UnsafeShuffleManager&amp;lt;/code&amp;gt;. SPARK-10708 merged it into the sort shuffle manager in 1.6.0, and since then &amp;lt;code&amp;gt;tungsten-sort&amp;lt;/code&amp;gt; is an alias for &amp;lt;code&amp;gt;SortShuffleManager&amp;lt;/code&amp;gt;, as it still is in 4.3.0.&amp;lt;ref name=&amp;quot;env150&amp;quot;&amp;gt;{{Cite web |url=https://github.com/apache/spark/blob/v1.5.0/core/src/main/scala/org/apache/spark/SparkEnv.scala |title=SparkEnv.scala (v1.5.0) |publisher=Apache Software Foundation |access-date=2026-11-22}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Cite web |url=https://issues.apache.org/jira/browse/SPARK-10708 |title=SPARK-10708: Consolidate SortShuffleManager and UnsafeShuffleManager |publisher=Apache Software Foundation JIRA |access-date=2026-11-22}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;sm430&amp;quot;&amp;gt;{{Cite web |url=https://github.com/apache/spark/blob/v4.3.0/core/src/main/scala/org/apache/spark/shuffle/ShuffleManager.scala |title=ShuffleManager.scala (v4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-22}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The &amp;lt;code&amp;gt;spark.sql.tungsten.enabled&amp;lt;/code&amp;gt; flag ===&lt;br /&gt;
The one Tungsten item that was deprecated is a configuration flag. In Spark 1.5.0, &amp;lt;code&amp;gt;spark.sql.tungsten.enabled&amp;lt;/code&amp;gt; (default true) switched the Tungsten execution backend and code generation on or off.&amp;lt;ref name=&amp;quot;r150&amp;quot; /&amp;gt;&amp;lt;ref&amp;gt;{{Cite web |url=https://github.com/apache/spark/blob/v1.5.0/sql/core/src/main/scala/org/apache/spark/sql/SQLConf.scala |title=SQLConf.scala (v1.5.0) |publisher=Apache Software Foundation |access-date=2026-11-22}}&amp;lt;/ref&amp;gt; Spark 1.6.0 moved it to a list of deprecated keys: setting it logged a warning that the property &amp;quot;is deprecated and will be ignored. Tungsten will continue to be used.&amp;quot;&amp;lt;ref&amp;gt;{{Cite web |url=https://github.com/apache/spark/blob/v1.6.0/sql/core/src/main/scala/org/apache/spark/sql/execution/commands.scala |title=commands.scala (v1.6.0) |publisher=Apache Software Foundation |access-date=2026-11-22}}&amp;lt;/ref&amp;gt; By Spark 2.0.0 the &amp;lt;code&amp;gt;SET&amp;lt;/code&amp;gt; command no longer has any special handling for it.&amp;lt;ref&amp;gt;{{Cite web |url=https://github.com/apache/spark/blob/v2.0.0/sql/core/src/main/scala/org/apache/spark/sql/execution/command/SetCommand.scala |title=SetCommand.scala (v2.0.0) |publisher=Apache Software Foundation |access-date=2026-11-22}}&amp;lt;/ref&amp;gt; There has been no way to turn Tungsten off as a whole since 1.6.0.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
This PySpark query runs a filter and an aggregation. After the query has run, &amp;lt;code&amp;gt;explain()&amp;lt;/code&amp;gt; shows the final adaptive plan, where the &amp;lt;code&amp;gt;*(1)&amp;lt;/code&amp;gt; prefix marks the three operators that were compiled together into one generated function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
df = spark.range(1000).filter(&amp;quot;id % 2 = 0&amp;quot;).selectExpr(&amp;quot;sum(id)&amp;quot;)&lt;br /&gt;
df.collect()&lt;br /&gt;
df.explain()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Part of the output from a Spark 4.3 build:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
   ResultQueryStage 0&lt;br /&gt;
   +- *(1) HashAggregate(keys=[], functions=[sum(id#0L)])&lt;br /&gt;
      +- *(1) Filter ((id#0L % 2) = 0)&lt;br /&gt;
         +- *(1) Range (0, 1000, step=1, splits=1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== What Tungsten is not ==&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Not the optimizer.&amp;#039;&amp;#039;&amp;#039; The [[Catalyst optimizer]] decides what plan to run; Tungsten work concerns how the chosen physical operators use memory and CPU. The MLlib guide, for example, lists &amp;quot;Tungsten and Catalyst optimizations&amp;quot; as benefits of DataFrames.&amp;lt;ref&amp;gt;{{Cite web |url=https://github.com/apache/spark/blob/v4.3.0/docs/ml-guide.md |title=Machine Learning Library (MLlib) Guide (docs/ml-guide.md at v4.3.0) |publisher=Apache Software Foundation |access-date=2026-11-22}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Not a native engine.&amp;#039;&amp;#039;&amp;#039; Tungsten code runs in the JVM and generates Java code. Native execution engines for Spark, such as Apache Gluten (with Velox) and Apache DataFusion Comet, replace JVM operators with native code; Photon is a proprietary Databricks engine. See [[Native execution engine (Spark)]].&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Not available to RDD code.&amp;#039;&amp;#039;&amp;#039; The binary row format and generated code apply to DataFrame, Dataset and SQL operators, which know the data types. Programs that use the [[RDD]] API with arbitrary JVM objects do not get these benefits.&amp;lt;ref name=&amp;quot;jira7075&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Catalyst optimizer]]&lt;br /&gt;
* [[Whole-stage code generation]]&lt;br /&gt;
* [[Spark memory management]]&lt;br /&gt;
* [[Shuffle]]&lt;br /&gt;
* [[Native execution engine (Spark)]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Navbox open lakehouse}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Concepts]]&lt;br /&gt;
[[Category:Glossary terms]]&lt;br /&gt;
[[Category:Apache Spark]]&lt;/div&gt;</summary>
		<author><name>Open Lakehouse Wiki sync</name></author>
	</entry>
</feed>