The Fusion engine is a vectorized SQL execution engine built into EMR Serverless Spark. It performs three times better than open source Spark on TPC-DS benchmark tests. The Fusion engine is fully compatible with open source Spark, so no code changes are required. Enable it by turning on the Use Fusion Acceleration switch when creating a session.
The Fusion engine accelerates Spark SQL and DataFrame jobs. It improves performance for most operators, expressions, and data types.
Limitations
The Fusion engine does not accelerate the following job types:
Resilient Distributed Dataset (RDD) jobs
Jobs that use user-defined functions (UDFs)
Supported storage formats
Parquet
Paimon
ORC (partial support)
Supported operators
Type | Operators |
Source | FileSourceScanExec, HiveTableScanExec, BatchScanExec, InMemoryTableScanExec |
Sink | DataWritingCommandExec |
Common operation | FilterExec, ProjectExec, SortExec, UnionExec |
Aggregation | HashAggregateExec |
Join | BroadcastHashJoinExec, ShuffledHashJoinExec, SortMergeJoinExec, BroadcastNestedLoopJoinExec, CartesianProductExec |
Window | WindowExec, WindowTopK |
Exchange | ShuffleExchangeExec, ReusedExchangeExec, BroadcastExchangeExec, CoalesceExec |
Limit | GlobalLimitExec, LocalLimitExec, TakeOrderedAndProjectExec |
Subquery | SubqueryBroadcastExec |
Others | ExpandExec, GenerateExec |
Unsupported operators
Type | Operators |
Aggregation | ObjectHashAggregateExec, SortAggregateExec |
Exchange | CustomShuffleReaderExec |
Pandas | AggregateInPandasExec, FlatMapGroupsInPandasExec, ArrowEvalPythonExec, MapInPandasExec, WindowInPandasExec |
Others | CollectLimitExec, RangeExec, SampleExec |
Supported expressions
Type | Expressions |
Comparison/Logic |
|
Arithmetic |
|
Bitwise |
|
Conditional |
|
Set |
|
String |
|
Aggregation |
|
Window |
|
Time |
|
JSON |
|
Array |
|
Map |
|
Encoding |
|
Others |
|
Supported data types
Byte, Short, Int, and Long
Boolean
String and Binary
Decimal
Float and Double
Date and Timestamp
Unsupported data types
Struct
Array
Map
Enable and use the Fusion engine
You can enable the Fusion engine using one of the following methods.
Method 1: Enable in session management
When creating SQL, Notebook, or Spark Thrift Server sessions, turn on the Use Fusion Acceleration option. When running tasks, select a session with Fusion acceleration enabled to use the Fusion engine.
For more information, see Manage sessions.
Method 2: Configure Spark parameter templates
In the EMR Serverless Spark console, go to Configurations > Task Templates and add Fusion-related parameters (spark.emr.serverless.fusion or spark.emr.serverless.fusion.enabled) in the configuration template. For a complete list of Spark parameters, see Custom Spark parameters.
For more information, see Manage Spark configuration templates.
Method 3: Configure Spark parameters in DataWorks
You can configure Spark parameters at the workspace level or node level.
Global configuration
Configure workspace-level Spark parameters for DataWorks modules running EMR tasks. Add the parameter spark.emr.serverless.fusion or spark.emr.serverless.fusion.enabled and set it to true. For a complete list of Spark parameters, see Custom Spark parameters.
For instructions, see Configure global Spark parameters.
Node-level configuration
For Spark nodes in Data Studio, configure Spark parameters in the scheduling settings on the right side of the node editing page. Add the parameter spark.emr.serverless.fusion or spark.emr.serverless.fusion.enabled and set it to true. For a complete list of Spark parameters, see Custom Spark parameters.
For instructions, see Configure node Spark parameters.