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: 37 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: 12 ms<br>peak memory: 64.2 MiB<br>number of output rows: 78<br>number of sort fallback tasks: 0<br>avg hash probes per key: 1" tooltip="HashAggregate(keys=[_groupingexpression#6016], functions=[count(1), sum(CASE WHEN (cast(airport_fee#5992 as int) > 0) THEN 1 ELSE 0 END), sum(CASE WHEN (tip_amount#5987 > 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: 136<br>partition data size: 5.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: 78<br>remote merged reqs duration: 0 ms<br>remote merged blocks fetched: 0<br>records read: 78<br>local bytes read: 5.3 KiB<br>merged fetch fallback count: 0<br>local blocks read: 64<br>remote merged chunks fetched: 0<br>remote blocks read: 0<br>data size: 3.7 KiB<br>local merged bytes read: 0.0 B<br>local merged chunks fetched: 0<br>shuffle write time: 9 ms<br>remote merged bytes read: 0.0 B<br>local merged blocks fetched: 0<br>corrupt merged block chunks: 0<br>fetch wait time: 0 ms<br>remote 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: 5.3 KiB" tooltip="Exchange hashpartitioning(_groupingexpression#6016, 200), ENSURE_REQUIREMENTS, [plan_id=1456]"];
subgraph cluster5 {
isCluster="true";
id="cluster5";
label="WholeStageCodegen (1)\n \nduration: total (min, med, max (stageId: taskId))\n4.8 s (209 ms, 4.6 s, 4.6 s (stage 116.0: task 672))";
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>4.6 s (102 ms, 4.5 s, 4.5 s (stage 116.0: task 672))<br>peak memory total (min, med, max (stageId: taskId))<br>512.0 KiB (256.0 KiB, 256.0 KiB, 256.0 KiB (stage 116.0: task 673))<br>number of output rows: 78<br>number of sort fallback tasks: 0<br>avg hash probes per key: 0" tooltip="HashAggregate(keys=[_groupingexpression#6016], functions=[partial_count(1), partial_sum(CASE WHEN (cast(airport_fee#5992 as int) > 0) THEN 1 ELSE 0 END), partial_sum(CASE WHEN (tip_amount#5987 > 0.0) THEN 1 ELSE 0 END)])"];
7 [id="node7" labelType="html" label="<br><b>Project</b><br><br>" tooltip="Project [tip_amount#5987, airport_fee#5992, date_format(cast(tpep_pickup_datetime#5975 as timestamp), yyyymm, Some(Etc/UTC)) AS _groupingexpression#6016]"];
8 [id="node8" labelType="html" label="<b>Filter</b><br><br>number of output rows: 8,714,635" tooltip="Filter ((isnotnull(tpep_pickup_datetime#5975) AND (year(cast(tpep_pickup_datetime#5975 as date)) >= 2018)) AND (year(cast(tpep_pickup_datetime#5975 as date)) <= 2025))"];
9 [id="node9" labelType="html" label="<b>ColumnarToRow</b><br><br>number of output rows: 8,714,667<br>number of input batches: 2,128" 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>618 ms (102 ms, 516 ms, 516 ms (stage 116.0: task 672))<br>metadata time: 0 ms<br>size of files read: 118.4 MiB<br>number of output rows: 8,714,667" tooltip="FileScan parquet [tpep_pickup_datetime#5975,tip_amount#5987,airport_fee#5992] Batched: true, DataFilters: [isnotnull(tpep_pickup_datetime#5975), (year(cast(tpep_pickup_datetime#5975 as date)) >= 2018), (..., Format: Parquet, Location: InMemoryFileIndex(1 paths)[file:/home/jovyan/data/yellow-taxi/yellow_tripdata_2018-06.parquet], PartitionFilters: [], PushedFilters: [IsNotNull(tpep_pickup_datetime)], ReadSchema: struct<tpep_pickup_datetime:timestamp_ntz,tip_amount:double,airport_fee:void>"];
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=3.7 KiB, rowCount=78)
+- 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#5975, tip_amount#5987, airport_fee#5992]
Batched: true
Location: InMemoryFileIndex [file:/home/jovyan/data/yellow-taxi/yellow_tripdata_2018-06.parquet]
PushedFilters: [IsNotNull(tpep_pickup_datetime)]
ReadSchema: struct<tpep_pickup_datetime:timestamp_ntz,tip_amount:double,airport_fee:void>
(2) ColumnarToRow [codegen id : 1]
Input [3]: [tpep_pickup_datetime#5975, tip_amount#5987, airport_fee#5992]
(3) Filter [codegen id : 1]
Input [3]: [tpep_pickup_datetime#5975, tip_amount#5987, airport_fee#5992]
Condition : ((isnotnull(tpep_pickup_datetime#5975) AND (year(cast(tpep_pickup_datetime#5975 as date)) >= 2018)) AND (year(cast(tpep_pickup_datetime#5975 as date)) <= 2025))
(4) Project [codegen id : 1]
Output [3]: [tip_amount#5987, airport_fee#5992, date_format(cast(tpep_pickup_datetime#5975 as timestamp), yyyymm, Some(Etc/UTC)) AS _groupingexpression#6016]
Input [3]: [tpep_pickup_datetime#5975, tip_amount#5987, airport_fee#5992]
(5) HashAggregate [codegen id : 1]
Input [3]: [tip_amount#5987, airport_fee#5992, _groupingexpression#6016]
Keys [1]: [_groupingexpression#6016]
Functions [3]: [partial_count(1), partial_sum(CASE WHEN (cast(airport_fee#5992 as int) > 0) THEN 1 ELSE 0 END), partial_sum(CASE WHEN (tip_amount#5987 > 0.0) THEN 1 ELSE 0 END)]
Aggregate Attributes [3]: [count#6018L, sum#6019L, sum#6020L]
Results [4]: [_groupingexpression#6016, count#6021L, sum#6022L, sum#6023L]
(6) Exchange
Input [4]: [_groupingexpression#6016, count#6021L, sum#6022L, sum#6023L]
Arguments: hashpartitioning(_groupingexpression#6016, 200), ENSURE_REQUIREMENTS, [plan_id=1456]
(7) ShuffleQueryStage
Output [4]: [_groupingexpression#6016, count#6021L, sum#6022L, sum#6023L]
Arguments: 0
(8) AQEShuffleRead
Input [4]: [_groupingexpression#6016, count#6021L, sum#6022L, sum#6023L]
Arguments: coalesced
(9) HashAggregate [codegen id : 2]
Input [4]: [_groupingexpression#6016, count#6021L, sum#6022L, sum#6023L]
Keys [1]: [_groupingexpression#6016]
Functions [3]: [count(1), sum(CASE WHEN (cast(airport_fee#5992 as int) > 0) THEN 1 ELSE 0 END), sum(CASE WHEN (tip_amount#5987 > 0.0) THEN 1 ELSE 0 END)]
Aggregate Attributes [3]: [count(1)#6013L, sum(CASE WHEN (cast(airport_fee#5992 as int) > 0) THEN 1 ELSE 0 END)#6014L, sum(CASE WHEN (tip_amount#5987 > 0.0) THEN 1 ELSE 0 END)#6015L]
Results [4]: [_groupingexpression#6016 AS month#6009, count(1)#6013L AS total_trips#6010L, sum(CASE WHEN (cast(airport_fee#5992 as int) > 0) THEN 1 ELSE 0 END)#6014L AS airport_trip#6011L, sum(CASE WHEN (tip_amount#5987 > 0.0) THEN 1 ELSE 0 END)#6015L AS tipped_trips#6012L]
(10) ResultQueryStage
Output [4]: [month#6009, total_trips#6010L, airport_trip#6011L, tipped_trips#6012L]
Arguments: 1
(11) Filter
Input [3]: [tpep_pickup_datetime#5975, tip_amount#5987, airport_fee#5992]
Condition : ((isnotnull(tpep_pickup_datetime#5975) AND (year(cast(tpep_pickup_datetime#5975 as date)) >= 2018)) AND (year(cast(tpep_pickup_datetime#5975 as date)) <= 2025))
(12) Project
Output [3]: [tip_amount#5987, airport_fee#5992, date_format(cast(tpep_pickup_datetime#5975 as timestamp), yyyymm, Some(Etc/UTC)) AS _groupingexpression#6016]
Input [3]: [tpep_pickup_datetime#5975, tip_amount#5987, airport_fee#5992]
(13) HashAggregate
Input [3]: [tip_amount#5987, airport_fee#5992, _groupingexpression#6016]
Keys [1]: [_groupingexpression#6016]
Functions [3]: [partial_count(1), partial_sum(CASE WHEN (cast(airport_fee#5992 as int) > 0) THEN 1 ELSE 0 END), partial_sum(CASE WHEN (tip_amount#5987 > 0.0) THEN 1 ELSE 0 END)]
Aggregate Attributes [3]: [count#6018L, sum#6019L, sum#6020L]
Results [4]: [_groupingexpression#6016, count#6021L, sum#6022L, sum#6023L]
(14) Exchange
Input [4]: [_groupingexpression#6016, count#6021L, sum#6022L, sum#6023L]
Arguments: hashpartitioning(_groupingexpression#6016, 200), ENSURE_REQUIREMENTS, [plan_id=1433]
(15) HashAggregate
Input [4]: [_groupingexpression#6016, count#6021L, sum#6022L, sum#6023L]
Keys [1]: [_groupingexpression#6016]
Functions [3]: [count(1), sum(CASE WHEN (cast(airport_fee#5992 as int) > 0) THEN 1 ELSE 0 END), sum(CASE WHEN (tip_amount#5987 > 0.0) THEN 1 ELSE 0 END)]
Aggregate Attributes [3]: [count(1)#6013L, sum(CASE WHEN (cast(airport_fee#5992 as int) > 0) THEN 1 ELSE 0 END)#6014L, sum(CASE WHEN (tip_amount#5987 > 0.0) THEN 1 ELSE 0 END)#6015L]
Results [4]: [_groupingexpression#6016 AS month#6009, count(1)#6013L AS total_trips#6010L, sum(CASE WHEN (cast(airport_fee#5992 as int) > 0) THEN 1 ELSE 0 END)#6014L AS airport_trip#6011L, sum(CASE WHEN (tip_amount#5987 > 0.0) THEN 1 ELSE 0 END)#6015L AS tipped_trips#6012L]
(16) CollectLimit
Input [4]: [month#6009, total_trips#6010L, airport_trip#6011L, tipped_trips#6012L]
Arguments: 1000
(17) AdaptiveSparkPlan
Output [4]: [month#6009, total_trips#6010L, airport_trip#6011L, tipped_trips#6012L]
Arguments: isFinalPlan=true