digraph G {
0 [labelType="html" label="<br><b>AdaptiveSparkPlan</b><br><br>"];
subgraph cluster1 {
isCluster="true";
label="WholeStageCodegen (3)\n \nduration: 0 ms";
2 [labelType="html" label="<b>HashAggregate</b><br><br>time in aggregation build: 0 ms<br>number of output rows: 1"];
}
3 [labelType="html" label="<b>Exchange</b><br><br>shuffle records written: 1<br>local merged chunks fetched: 0<br>shuffle write time: 1 ms<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: 1<br>local bytes read: 59.0 B<br>fetch wait time: 0 ms<br>remote bytes read: 0.0 B<br>merged fetch fallback count: 0<br>local blocks read: 1<br>remote merged chunks fetched: 0<br>remote blocks read: 0<br>data size: 16.0 B<br>local merged bytes read: 0.0 B<br>number of partitions: 1<br>remote reqs duration: 0 ms<br>remote bytes read to disk: 0.0 B<br>shuffle bytes written: 59.0 B"];
subgraph cluster4 {
isCluster="true";
label="WholeStageCodegen (2)\n \nduration: 7 ms";
5 [labelType="html" label="<b>HashAggregate</b><br><br>spill size: 0.0 B<br>time in aggregation build: 6 ms<br>peak memory: 0.0 B<br>number of output rows: 1<br>number of sort fallback tasks: 0<br>avg hash probes per key: 0"];
6 [labelType="html" label="<b>HashAggregate</b><br><br>spill size: 0.0 B<br>time in aggregation build: 0 ms<br>peak memory: 256.0 KiB<br>number of output rows: 2<br>number of sort fallback tasks: 0<br>avg hash probes per key: 0"];
}
7 [labelType="html" label="<b>AQEShuffleRead</b><br><br>number of partitions: 1<br>partition data size: 144.0 B<br>number of coalesced partitions: 1"];
8 [labelType="html" label="<b>Exchange</b><br><br>shuffle records written: 2<br>local merged chunks fetched: 0<br>shuffle write time: 0 ms<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<br>local bytes read: 136.0 B<br>fetch wait time: 0 ms<br>remote bytes read: 0.0 B<br>merged fetch fallback count: 0<br>local blocks read: 1<br>remote merged chunks fetched: 0<br>remote blocks read: 0<br>data size: 48.0 B<br>local merged bytes read: 0.0 B<br>number of partitions: 10<br>remote reqs duration: 0 ms<br>remote bytes read to disk: 0.0 B<br>shuffle bytes written: 136.0 B"];
subgraph cluster9 {
isCluster="true";
label="WholeStageCodegen (1)\n \nduration: 10 ms";
10 [labelType="html" label="<b>HashAggregate</b><br><br>spill size: 0.0 B<br>time in aggregation build: 3 ms<br>peak memory: 256.0 KiB<br>number of output rows: 2<br>number of sort fallback tasks: 0<br>avg hash probes per key: 0"];
11 [labelType="html" label="<br><b>Project</b><br><br>"];
12 [labelType="html" label="<b>ColumnarToRow</b><br><br>number of output rows: 189<br>number of input batches: 1"];
}
13 [labelType="html" label="<b>Scan parquet </b><br><br>number of files read: 1<br>scan time: 2 ms<br>metadata time: 0 ms<br>size of files read: 11.3 KiB<br>number of output rows: 189"];
2->0;
3->2;
5->3;
6->5;
7->6;
8->7;
10->8;
11->10;
12->11;
13->12;
}
14
AdaptiveSparkPlan isFinalPlan=true
HashAggregate(keys=[], functions=[count(distinct COL_GENDER_3335#105381)])
WholeStageCodegen (3)
Exchange SinglePartition, ENSURE_REQUIREMENTS, [plan_id=16049]
HashAggregate(keys=[], functions=[partial_count(distinct COL_GENDER_3335#105381)])
HashAggregate(keys=[COL_GENDER_3335#105381], functions=[])
WholeStageCodegen (2)
AQEShuffleRead coalesced
Exchange hashpartitioning(COL_GENDER_3335#105381, 10), ENSURE_REQUIREMENTS, [plan_id=16020]
HashAggregate(keys=[COL_GENDER_3335#105381], functions=[])
Project [GENDER_3335#105334 AS COL_GENDER_3335#105381]
ColumnarToRow
WholeStageCodegen (1)
FileScan parquet [GENDER_3335#105334] Batched: true, DataFilters: [], Format: Parquet, Location: InMemoryFileIndex(1 paths)[file:/data/output/cache/parquet/uet/PATIENT_3332], PartitionFilters: [], PushedFilters: [], ReadSchema: struct<GENDER_3335:string>
== Physical Plan ==
AdaptiveSparkPlan (20)
+- == Final Plan ==
* HashAggregate (12)
+- ShuffleQueryStage (11), Statistics(sizeInBytes=16.0 B, rowCount=1)
+- Exchange (10)
+- * HashAggregate (9)
+- * HashAggregate (8)
+- AQEShuffleRead (7)
+- ShuffleQueryStage (6), Statistics(sizeInBytes=48.0 B, rowCount=2)
+- Exchange (5)
+- * HashAggregate (4)
+- * Project (3)
+- * ColumnarToRow (2)
+- Scan parquet (1)
+- == Initial Plan ==
HashAggregate (19)
+- Exchange (18)
+- HashAggregate (17)
+- HashAggregate (16)
+- Exchange (15)
+- HashAggregate (14)
+- Project (13)
+- Scan parquet (1)
(1) Scan parquet
Output [1]: [GENDER_3335#105334]
Batched: true
Location: InMemoryFileIndex [file:/data/output/cache/parquet/uet/PATIENT_3332]
ReadSchema: struct<GENDER_3335:string>
(2) ColumnarToRow [codegen id : 1]
Input [1]: [GENDER_3335#105334]
(3) Project [codegen id : 1]
Output [1]: [GENDER_3335#105334 AS COL_GENDER_3335#105381]
Input [1]: [GENDER_3335#105334]
(4) HashAggregate [codegen id : 1]
Input [1]: [COL_GENDER_3335#105381]
Keys [1]: [COL_GENDER_3335#105381]
Functions: []
Aggregate Attributes: []
Results [1]: [COL_GENDER_3335#105381]
(5) Exchange
Input [1]: [COL_GENDER_3335#105381]
Arguments: hashpartitioning(COL_GENDER_3335#105381, 10), ENSURE_REQUIREMENTS, [plan_id=16020]
(6) ShuffleQueryStage
Output [1]: [COL_GENDER_3335#105381]
Arguments: 0
(7) AQEShuffleRead
Input [1]: [COL_GENDER_3335#105381]
Arguments: coalesced
(8) HashAggregate [codegen id : 2]
Input [1]: [COL_GENDER_3335#105381]
Keys [1]: [COL_GENDER_3335#105381]
Functions: []
Aggregate Attributes: []
Results [1]: [COL_GENDER_3335#105381]
(9) HashAggregate [codegen id : 2]
Input [1]: [COL_GENDER_3335#105381]
Keys: []
Functions [1]: [partial_count(distinct COL_GENDER_3335#105381)]
Aggregate Attributes [1]: [count(COL_GENDER_3335#105381)#105405L]
Results [1]: [count#105411L]
(10) Exchange
Input [1]: [count#105411L]
Arguments: SinglePartition, ENSURE_REQUIREMENTS, [plan_id=16049]
(11) ShuffleQueryStage
Output [1]: [count#105411L]
Arguments: 1
(12) HashAggregate [codegen id : 3]
Input [1]: [count#105411L]
Keys: []
Functions [1]: [count(distinct COL_GENDER_3335#105381)]
Aggregate Attributes [1]: [count(COL_GENDER_3335#105381)#105405L]
Results [1]: [count(COL_GENDER_3335#105381)#105405L AS COL_GENDER_33351#105395L]
(13) Project
Output [1]: [GENDER_3335#105334 AS COL_GENDER_3335#105381]
Input [1]: [GENDER_3335#105334]
(14) HashAggregate
Input [1]: [COL_GENDER_3335#105381]
Keys [1]: [COL_GENDER_3335#105381]
Functions: []
Aggregate Attributes: []
Results [1]: [COL_GENDER_3335#105381]
(15) Exchange
Input [1]: [COL_GENDER_3335#105381]
Arguments: hashpartitioning(COL_GENDER_3335#105381, 10), ENSURE_REQUIREMENTS, [plan_id=15993]
(16) HashAggregate
Input [1]: [COL_GENDER_3335#105381]
Keys [1]: [COL_GENDER_3335#105381]
Functions: []
Aggregate Attributes: []
Results [1]: [COL_GENDER_3335#105381]
(17) HashAggregate
Input [1]: [COL_GENDER_3335#105381]
Keys: []
Functions [1]: [partial_count(distinct COL_GENDER_3335#105381)]
Aggregate Attributes [1]: [count(COL_GENDER_3335#105381)#105405L]
Results [1]: [count#105411L]
(18) Exchange
Input [1]: [count#105411L]
Arguments: SinglePartition, ENSURE_REQUIREMENTS, [plan_id=15997]
(19) HashAggregate
Input [1]: [count#105411L]
Keys: []
Functions [1]: [count(distinct COL_GENDER_3335#105381)]
Aggregate Attributes [1]: [count(COL_GENDER_3335#105381)#105405L]
Results [1]: [count(COL_GENDER_3335#105381)#105405L AS COL_GENDER_33351#105395L]
(20) AdaptiveSparkPlan
Output [1]: [COL_GENDER_33351#105395L]
Arguments: isFinalPlan=true