Show the Stage ID and Task ID that corresponds to the max metric
digraph G {
0 [labelType="html" label="<br><b>AdaptiveSparkPlan</b><br><br>"];
1 [labelType="html" label="<br><b>CollectLimit</b><br><br>"];
subgraph cluster2 {
isCluster="true";
label="WholeStageCodegen (3)\n \nduration: 0 ms";
3 [labelType="html" label="<br><b>Project</b><br><br>"];
}
4 [labelType="html" label="<b>Window</b><br><br>spill size: 0.0 B"];
subgraph cluster5 {
isCluster="true";
label="WholeStageCodegen (2)\n \nduration: 0 ms";
6 [labelType="html" label="<b>Sort</b><br><br>sort time: 5.2 s<br>peak memory: 512.0 MiB<br>spill size: 0.0 B"];
}
7 [labelType="html" label="<b>AQEShuffleRead</b><br><br>number of partitions: 2<br>partition data size total (min, med, max (stageId: taskId))<br>128.1 MiB (63.3 MiB, 64.8 MiB, 64.8 MiB (driver))<br>number of coalesced partitions: 2"];
8 [labelType="html" label="<b>Exchange</b><br><br>shuffle records written: 4,230,360<br>local merged chunks fetched: 0<br>shuffle write time total (min, med, max (stageId: taskId))<br>657 ms (0 ms, 104 ms, 125 ms (stage 5.0: task 12))<br>remote merged bytes read: 0.0 B<br>local merged blocks fetched: 0<br>corrupt merged block chunks: 0<br>remote merged reqs duration: 0 ms<br>remote merged blocks fetched: 0<br>records read: 2,092,252<br>local bytes read: 60.4 MiB<br>fetch wait time: 0 ms<br>remote bytes read: 0.0 B<br>merged fetch fallback count: 0<br>local blocks read: 7<br>remote merged chunks fetched: 0<br>remote blocks read: 0<br>data size total (min, med, max (stageId: taskId))<br>871.4 MiB (0.0 B, 146.5 MiB, 147.6 MiB (stage 5.0: task 12))<br>local merged bytes read: 0.0 B<br>number of partitions: 200<br>remote reqs duration: 0 ms<br>remote bytes read to disk: 0.0 B<br>shuffle bytes written total (min, med, max (stageId: taskId))<br>122.0 MiB (0.0 B, 20.5 MiB, 20.7 MiB (stage 5.0: task 12))"];
subgraph cluster9 {
isCluster="true";
label="WholeStageCodegen (1)\n \nduration: total (min, med, max (stageId: taskId))\n24.2 s (0 ms, 3.9 s, 4.2 s (stage 5.0: task 11))";
10 [labelType="html" label="<br><b>Project</b><br><br>"];
11 [labelType="html" label="<br><b>Project</b><br><br>"];
}
12 [labelType="html" label="<b>Scan csv </b><br><br>number of output rows: 4,230,360<br>number of files read: 5<br>metadata time total (min, med, max (stageId: taskId))<br>0 ms (0 ms, 0 ms, 0 ms (stage 7.0: task 17))<br>size of files read total (min, med, max (stageId: taskId))<br>760.1 MiB (0.0 B, 760.1 MiB, 760.1 MiB (driver))"];
1->0;
3->1;
4->3;
6->4;
7->6;
8->7;
10->8;
11->10;
12->11;
}
13
AdaptiveSparkPlan isFinalPlan=true
CollectLimit 6
Project [toprettystring(ride_id#17, Some(Etc/UTC)) AS toprettystring(ride_id)#204, toprettystring(is_valid_ride_id#154, Some(Etc/UTC)) AS toprettystring(is_valid_ride_id)#205, toprettystring(is_valid_duration#155, Some(Etc/UTC)) AS toprettystring(is_valid_duration)#206, toprettystring(is_valid_stations#156, Some(Etc/UTC)) AS toprettystring(is_valid_stations)#207, toprettystring(_source_file#157, Some(Etc/UTC)) AS toprettystring(_source_file)#208, 2026-11-06 14:13:39.7842 AS toprettystring(_processed_dttm)#209, toprettystring(_start_station_ride_num#160, Some(Etc/UTC)) AS toprettystring(_start_station_ride_num)#210, toprettystring(year#161, Some(Etc/UTC)) AS toprettystring(year)#211, toprettystring(month#162, Some(Etc/UTC)) AS toprettystring(month)#212]
Project [ride_id#17, started_at#72, start_station_id#22, (isnotnull(ride_id#17) AND NOT (trim(ride_id#17, None) = )) AS is_valid_ride_id#154, ((isnotnull(started_at#72) AND isnotnull(ended_at#73)) AND (ended_at#73 > started_at#72)) AS is_valid_duration#155, ((isnotnull(start_station_id#22) AND isnotnull(end_station_id#24)) AND NOT (end_station_id#24 = start_station_id#22)) AS is_valid_stations#156, input_file_name() AS _source_file#157, year(cast(started_at#72 as date)) AS year#161, month(cast(started_at#72 as date)) AS month#162, year(cast(started_at#72 as date)) AS _w0#163, month(cast(started_at#72 as date)) AS _w1#164]
Project [ride_id#17, cast(started_at#19 as timestamp) AS started_at#72, cast(ended_at#20 as timestamp) AS ended_at#73, start_station_id#22, end_station_id#24]