digraph G {
0 [id="node0" labelType="html" label="<br><b>AdaptiveSparkPlan</b><br><br>" tooltip="AdaptiveSparkPlan isFinalPlan=true"];
subgraph cluster1 {
isCluster="true";
id="cluster1";
label="WholeStageCodegen (2)\n \nduration: 26 ms";
tooltip="WholeStageCodegen (2)";
2 [id="node2" labelType="html" label="<b>HashAggregate</b><br><br>spill size: 0.0 B<br>time in aggregation build: 7 ms<br>peak memory: 64.2 MiB<br>number of output rows: 60<br>number of sort fallback tasks: 0<br>avg hash probes per key: 1" tooltip="HashAggregate(keys=[_groupingexpression#6075], functions=[count(1), sum(CASE WHEN (airport_fee#6058 > 0.0) THEN 1 ELSE 0 END), sum(CASE WHEN (tip_amount#6053 > 0.0) THEN 1 ELSE 0 END)])"];
}
3 [id="node3" labelType="html" label="<b>AQEShuffleRead</b><br><br>number of partitions: 1<br>number of empty partitions: 146<br>partition data size: 9.6 KiB<br>number of coalesced partitions: 1" tooltip="AQEShuffleRead coalesced"];
4 [id="node4" labelType="html" label="<b>Exchange</b><br><br>shuffle records written: 120<br>remote merged reqs duration: 0 ms<br>remote merged blocks fetched: 0<br>records read: 120<br>local bytes read: 4.5 KiB<br>merged fetch fallback count: 0<br>local blocks read: 54<br>remote merged chunks fetched: 0<br>remote blocks read: 54<br>data size total (min, med, max (stageId: taskId))<br>5.6 KiB (2.8 KiB, 2.8 KiB, 2.8 KiB (stage 123.0: task 680))<br>local merged bytes read: 0.0 B<br>local merged chunks fetched: 0<br>shuffle write time total (min, med, max (stageId: taskId))<br>24 ms (9 ms, 15 ms, 15 ms (stage 123.0: task 680))<br>remote merged bytes read: 0.0 B<br>local merged blocks fetched: 0<br>corrupt merged block chunks: 0<br>fetch wait time: 4 ms<br>remote bytes read: 4.6 KiB<br>number of partitions: 200<br>remote reqs duration: 15 ms<br>remote bytes read to disk: 0.0 B<br>shuffle bytes written total (min, med, max (stageId: taskId))<br>9.1 KiB (4.5 KiB, 4.6 KiB, 4.6 KiB (stage 123.0: task 680))" tooltip="Exchange hashpartitioning(_groupingexpression#6075, 200), ENSURE_REQUIREMENTS, [plan_id=1574]"];
subgraph cluster5 {
isCluster="true";
id="cluster5";
label="WholeStageCodegen (1)\n \nduration: total (min, med, max (stageId: taskId))\n3.4 s (1.4 s, 2.0 s, 2.0 s (stage 123.0: task 679))";
tooltip="WholeStageCodegen (1)";
6 [id="node6" labelType="html" label="<b>HashAggregate</b><br><br>spill size: 0.0 B<br>time in aggregation build total (min, med, max (stageId: taskId))<br>3.4 s (1.4 s, 2.0 s, 2.0 s (stage 123.0: task 679))<br>peak memory total (min, med, max (stageId: taskId))<br>512.0 KiB (256.0 KiB, 256.0 KiB, 256.0 KiB (stage 123.0: task 680))<br>number of output rows: 120<br>number of sort fallback tasks: 0<br>avg hash probes per key: 0" tooltip="HashAggregate(keys=[_groupingexpression#6075], functions=[partial_count(1), partial_sum(CASE WHEN (airport_fee#6058 > 0.0) THEN 1 ELSE 0 END), partial_sum(CASE WHEN (tip_amount#6053 > 0.0) THEN 1 ELSE 0 END)])"];
7 [id="node7" labelType="html" label="<br><b>Project</b><br><br>" tooltip="Project [tip_amount#6053, Airport_fee#6058, date_format(cast(tpep_pickup_datetime#6041 as timestamp), yyyymm, Some(Etc/UTC)) AS _groupingexpression#6075]"];
8 [id="node8" labelType="html" label="<b>Filter</b><br><br>number of output rows: 3,539,187" tooltip="Filter ((isnotnull(tpep_pickup_datetime#6041) AND (year(cast(tpep_pickup_datetime#6041 as date)) >= 2018)) AND (year(cast(tpep_pickup_datetime#6041 as date)) <= 2025))"];
9 [id="node9" labelType="html" label="<b>ColumnarToRow</b><br><br>number of output rows: 3,539,193<br>number of input batches: 865" tooltip="ColumnarToRow"];
}
10 [id="node10" labelType="html" label="<b>Scan parquet </b><br><br>number of files read: 1<br>scan time total (min, med, max (stageId: taskId))<br>301 ms (132 ms, 169 ms, 169 ms (stage 123.0: task 679))<br>metadata time: 0 ms<br>size of files read: 57.1 MiB<br>number of output rows: 3,539,193" tooltip="FileScan parquet [tpep_pickup_datetime#6041,tip_amount#6053,Airport_fee#6058] Batched: true, DataFilters: [isnotnull(tpep_pickup_datetime#6041), (year(cast(tpep_pickup_datetime#6041 as date)) >= 2018), (..., Format: Parquet, Location: InMemoryFileIndex(1 paths)[file:/home/jovyan/data/yellow-taxi/yellow_tripdata_2024-06.parquet], PartitionFilters: [], PushedFilters: [IsNotNull(tpep_pickup_datetime)], ReadSchema: struct<tpep_pickup_datetime:timestamp_ntz,tip_amount:double,Airport_fee:double>"];
2->0;
3->2;
4->3;
6->4;
7->6;
8->7;
9->8;
10->9;
}
== Physical Plan ==
AdaptiveSparkPlan (17)
+- == Final Plan ==
ResultQueryStage (10), Statistics(sizeInBytes=8.0 EiB)
+- * HashAggregate (9)
+- AQEShuffleRead (8)
+- ShuffleQueryStage (7), Statistics(sizeInBytes=5.6 KiB, rowCount=120)
+- Exchange (6)
+- * HashAggregate (5)
+- * Project (4)
+- * Filter (3)
+- * ColumnarToRow (2)
+- Scan parquet (1)
+- == Initial Plan ==
CollectLimit (16)
+- HashAggregate (15)
+- Exchange (14)
+- HashAggregate (13)
+- Project (12)
+- Filter (11)
+- Scan parquet (1)
(1) Scan parquet
Output [3]: [tpep_pickup_datetime#6041, tip_amount#6053, Airport_fee#6058]
Batched: true
Location: InMemoryFileIndex [file:/home/jovyan/data/yellow-taxi/yellow_tripdata_2024-06.parquet]
PushedFilters: [IsNotNull(tpep_pickup_datetime)]
ReadSchema: struct<tpep_pickup_datetime:timestamp_ntz,tip_amount:double,Airport_fee:double>
(2) ColumnarToRow [codegen id : 1]
Input [3]: [tpep_pickup_datetime#6041, tip_amount#6053, Airport_fee#6058]
(3) Filter [codegen id : 1]
Input [3]: [tpep_pickup_datetime#6041, tip_amount#6053, Airport_fee#6058]
Condition : ((isnotnull(tpep_pickup_datetime#6041) AND (year(cast(tpep_pickup_datetime#6041 as date)) >= 2018)) AND (year(cast(tpep_pickup_datetime#6041 as date)) <= 2025))
(4) Project [codegen id : 1]
Output [3]: [tip_amount#6053, Airport_fee#6058, date_format(cast(tpep_pickup_datetime#6041 as timestamp), yyyymm, Some(Etc/UTC)) AS _groupingexpression#6075]
Input [3]: [tpep_pickup_datetime#6041, tip_amount#6053, Airport_fee#6058]
(5) HashAggregate [codegen id : 1]
Input [3]: [tip_amount#6053, Airport_fee#6058, _groupingexpression#6075]
Keys [1]: [_groupingexpression#6075]
Functions [3]: [partial_count(1), partial_sum(CASE WHEN (airport_fee#6058 > 0.0) THEN 1 ELSE 0 END), partial_sum(CASE WHEN (tip_amount#6053 > 0.0) THEN 1 ELSE 0 END)]
Aggregate Attributes [3]: [count#6077L, sum#6078L, sum#6079L]
Results [4]: [_groupingexpression#6075, count#6080L, sum#6081L, sum#6082L]
(6) Exchange
Input [4]: [_groupingexpression#6075, count#6080L, sum#6081L, sum#6082L]
Arguments: hashpartitioning(_groupingexpression#6075, 200), ENSURE_REQUIREMENTS, [plan_id=1574]
(7) ShuffleQueryStage
Output [4]: [_groupingexpression#6075, count#6080L, sum#6081L, sum#6082L]
Arguments: 0
(8) AQEShuffleRead
Input [4]: [_groupingexpression#6075, count#6080L, sum#6081L, sum#6082L]
Arguments: coalesced
(9) HashAggregate [codegen id : 2]
Input [4]: [_groupingexpression#6075, count#6080L, sum#6081L, sum#6082L]
Keys [1]: [_groupingexpression#6075]
Functions [3]: [count(1), sum(CASE WHEN (airport_fee#6058 > 0.0) THEN 1 ELSE 0 END), sum(CASE WHEN (tip_amount#6053 > 0.0) THEN 1 ELSE 0 END)]
Aggregate Attributes [3]: [count(1)#6072L, sum(CASE WHEN (airport_fee#6058 > 0.0) THEN 1 ELSE 0 END)#6073L, sum(CASE WHEN (tip_amount#6053 > 0.0) THEN 1 ELSE 0 END)#6074L]
Results [4]: [_groupingexpression#6075 AS month#6068, count(1)#6072L AS total_trips#6069L, sum(CASE WHEN (airport_fee#6058 > 0.0) THEN 1 ELSE 0 END)#6073L AS airport_trip#6070L, sum(CASE WHEN (tip_amount#6053 > 0.0) THEN 1 ELSE 0 END)#6074L AS tipped_trips#6071L]
(10) ResultQueryStage
Output [4]: [month#6068, total_trips#6069L, airport_trip#6070L, tipped_trips#6071L]
Arguments: 1
(11) Filter
Input [3]: [tpep_pickup_datetime#6041, tip_amount#6053, Airport_fee#6058]
Condition : ((isnotnull(tpep_pickup_datetime#6041) AND (year(cast(tpep_pickup_datetime#6041 as date)) >= 2018)) AND (year(cast(tpep_pickup_datetime#6041 as date)) <= 2025))
(12) Project
Output [3]: [tip_amount#6053, Airport_fee#6058, date_format(cast(tpep_pickup_datetime#6041 as timestamp), yyyymm, Some(Etc/UTC)) AS _groupingexpression#6075]
Input [3]: [tpep_pickup_datetime#6041, tip_amount#6053, Airport_fee#6058]
(13) HashAggregate
Input [3]: [tip_amount#6053, Airport_fee#6058, _groupingexpression#6075]
Keys [1]: [_groupingexpression#6075]
Functions [3]: [partial_count(1), partial_sum(CASE WHEN (airport_fee#6058 > 0.0) THEN 1 ELSE 0 END), partial_sum(CASE WHEN (tip_amount#6053 > 0.0) THEN 1 ELSE 0 END)]
Aggregate Attributes [3]: [count#6077L, sum#6078L, sum#6079L]
Results [4]: [_groupingexpression#6075, count#6080L, sum#6081L, sum#6082L]
(14) Exchange
Input [4]: [_groupingexpression#6075, count#6080L, sum#6081L, sum#6082L]
Arguments: hashpartitioning(_groupingexpression#6075, 200), ENSURE_REQUIREMENTS, [plan_id=1551]
(15) HashAggregate
Input [4]: [_groupingexpression#6075, count#6080L, sum#6081L, sum#6082L]
Keys [1]: [_groupingexpression#6075]
Functions [3]: [count(1), sum(CASE WHEN (airport_fee#6058 > 0.0) THEN 1 ELSE 0 END), sum(CASE WHEN (tip_amount#6053 > 0.0) THEN 1 ELSE 0 END)]
Aggregate Attributes [3]: [count(1)#6072L, sum(CASE WHEN (airport_fee#6058 > 0.0) THEN 1 ELSE 0 END)#6073L, sum(CASE WHEN (tip_amount#6053 > 0.0) THEN 1 ELSE 0 END)#6074L]
Results [4]: [_groupingexpression#6075 AS month#6068, count(1)#6072L AS total_trips#6069L, sum(CASE WHEN (airport_fee#6058 > 0.0) THEN 1 ELSE 0 END)#6073L AS airport_trip#6070L, sum(CASE WHEN (tip_amount#6053 > 0.0) THEN 1 ELSE 0 END)#6074L AS tipped_trips#6071L]
(16) CollectLimit
Input [4]: [month#6068, total_trips#6069L, airport_trip#6070L, tipped_trips#6071L]
Arguments: 1000
(17) AdaptiveSparkPlan
Output [4]: [month#6068, total_trips#6069L, airport_trip#6070L, tipped_trips#6071L]
Arguments: isFinalPlan=true