digraph G {
0 [labelType="html" label="<br><b>AdaptiveSparkPlan</b><br><br>"];
subgraph cluster1 {
isCluster="true";
label="WholeStageCodegen (6)\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: 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: 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 (5)\n \nduration: 56 ms";
5 [labelType="html" label="<b>HashAggregate</b><br><br>spill size: 0.0 B<br>time in aggregation build: 56 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="<br><b>Project</b><br><br>"];
7 [labelType="html" label="<b>SortMergeJoin</b><br><br>number of output rows: 1,382<br>spill size: 0.0 B"];
}
subgraph cluster8 {
isCluster="true";
label="WholeStageCodegen (3)\n \nduration: 153 ms";
9 [labelType="html" label="<b>Sort</b><br><br>sort time: 12 ms<br>peak memory: 64.1 MiB<br>spill size: 0.0 B"];
}
10 [labelType="html" label="<b>AQEShuffleRead</b><br><br>number of partitions: 1<br>partition data size: 13.1 KiB<br>number of coalesced partitions: 1"];
11 [labelType="html" label="<b>Exchange</b><br><br>shuffle records written: 1,382<br>local merged chunks fetched: 0<br>shuffle write time: 2 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,382<br>local bytes read: 12.6 KiB<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: 75.6 KiB<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: 12.6 KiB"];
subgraph cluster12 {
isCluster="true";
label="WholeStageCodegen (1)\n \nduration: 97 ms";
13 [labelType="html" label="<br><b>Project</b><br><br>"];
14 [labelType="html" label="<b>Scan JDBCRelation((SELECT RAWTOHEX(VISIT_UNIT_ID), RAWTOHEX(VISIT_ID), RAWTOHEX(PATIENT_ID), \"UNIT\", \"ACTIVITY\", \"IN_DATE\", \"OUT_DATE\" FROM \"DTM_622\".\"VISIT_UNIT\") x) [numPartitions=1] </b><br><br>number of output rows: 1,382"];
}
subgraph cluster15 {
isCluster="true";
label="WholeStageCodegen (4)\n \nduration: 72 ms";
16 [labelType="html" label="<b>Sort</b><br><br>sort time: 3 ms<br>peak memory: 64.1 MiB<br>spill size: 0.0 B"];
}
17 [labelType="html" label="<b>AQEShuffleRead</b><br><br>number of partitions: 1<br>partition data size: 9.4 KiB<br>number of coalesced partitions: 1"];
18 [labelType="html" label="<b>Exchange</b><br><br>shuffle records written: 189<br>local merged chunks fetched: 0<br>shuffle write time: 2 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: 189<br>local bytes read: 8.8 KiB<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: 10.3 KiB<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: 8.8 KiB"];
subgraph cluster19 {
isCluster="true";
label="WholeStageCodegen (2)\n \nduration: 99 ms";
20 [labelType="html" label="<br><b>Project</b><br><br>"];
21 [labelType="html" label="<b>Scan JDBCRelation((SELECT RAWTOHEX(PATIENT_ID), \"BIRTH_DATE\", \"GENDER\", \"PSEUDO\", \"INHOSPITAL_DEATH_DATE\", \"INHOSPITAL_DEATH_CODE\", \"DEATH_DATE\", \"EXTERNAL_DEATH_PROCESS_ID\" FROM \"DTM_622\".\"PATIENT\") x) [numPartitions=1] </b><br><br>number of output rows: 189"];
}
2->0;
3->2;
5->3;
6->5;
7->6;
9->7;
10->9;
11->10;
13->11;
14->13;
16->7;
17->16;
18->17;
20->18;
21->20;
}
22
AdaptiveSparkPlan isFinalPlan=true
HashAggregate(keys=[], functions=[count(1)])
WholeStageCodegen (6)
Exchange SinglePartition, ENSURE_REQUIREMENTS, [plan_id=8465]
HashAggregate(keys=[], functions=[partial_count(1)])
Project
SortMergeJoin [COL_FC9902B4_8859_4AF9_ADF1_99A2E15E5351#53969], [PATIENT_3332_PATIENT_ID_3333#54153], LeftOuter
WholeStageCodegen (5)
Sort [COL_FC9902B4_8859_4AF9_ADF1_99A2E15E5351#53969 ASC NULLS FIRST], false, 0
WholeStageCodegen (3)
AQEShuffleRead coalesced
Exchange hashpartitioning(COL_FC9902B4_8859_4AF9_ADF1_99A2E15E5351#53969, 10), ENSURE_REQUIREMENTS, [plan_id=8300]
Project [RAWTOHEX(PATIENT_ID)#53857 AS COL_FC9902B4_8859_4AF9_ADF1_99A2E15E5351#53969]
Scan JDBCRelation((SELECT RAWTOHEX(VISIT_UNIT_ID), RAWTOHEX(VISIT_ID), RAWTOHEX(PATIENT_ID), "UNIT", "ACTIVITY", "IN_DATE", "OUT_DATE" FROM "DTM_622"."VISIT_UNIT") x) [numPartitions=1] [RAWTOHEX(PATIENT_ID)#53857] PushedFilters: [], ReadSchema: struct<RAWTOHEX(PATIENT_ID):string>
WholeStageCodegen (1)
Sort [PATIENT_3332_PATIENT_ID_3333#54153 ASC NULLS FIRST], false, 0
WholeStageCodegen (4)
AQEShuffleRead coalesced
Exchange hashpartitioning(PATIENT_3332_PATIENT_ID_3333#54153, 10), ENSURE_REQUIREMENTS, [plan_id=8307]
Project [RAWTOHEX(PATIENT_ID)#53695 AS PATIENT_3332_PATIENT_ID_3333#54153]
Scan JDBCRelation((SELECT RAWTOHEX(PATIENT_ID), "BIRTH_DATE", "GENDER", "PSEUDO", "INHOSPITAL_DEATH_DATE", "INHOSPITAL_DEATH_CODE", "DEATH_DATE", "EXTERNAL_DEATH_PROCESS_ID" FROM "DTM_622"."PATIENT") x) [numPartitions=1] [RAWTOHEX(PATIENT_ID)#53695] PushedFilters: [*IsNotNull(RAWTOHEX(PATIENT_ID))], ReadSchema: struct<RAWTOHEX(PATIENT_ID):string>
WholeStageCodegen (2)
== Physical Plan ==
AdaptiveSparkPlan (28)
+- == Final Plan ==
* HashAggregate (18)
+- ShuffleQueryStage (17), Statistics(sizeInBytes=16.0 B, rowCount=1)
+- Exchange (16)
+- * HashAggregate (15)
+- * Project (14)
+- * SortMergeJoin LeftOuter (13)
:- * Sort (6)
: +- AQEShuffleRead (5)
: +- ShuffleQueryStage (4), Statistics(sizeInBytes=75.6 KiB, rowCount=1.38E+3)
: +- Exchange (3)
: +- * Project (2)
: +- * Scan JDBCRelation((SELECT RAWTOHEX(VISIT_UNIT_ID), RAWTOHEX(VISIT_ID), RAWTOHEX(PATIENT_ID), "UNIT", "ACTIVITY", "IN_DATE", "OUT_DATE" FROM "DTM_622"."VISIT_UNIT") x) [numPartitions=1] (1)
+- * Sort (12)
+- AQEShuffleRead (11)
+- ShuffleQueryStage (10), Statistics(sizeInBytes=10.3 KiB, rowCount=189)
+- Exchange (9)
+- * Project (8)
+- * Scan JDBCRelation((SELECT RAWTOHEX(PATIENT_ID), "BIRTH_DATE", "GENDER", "PSEUDO", "INHOSPITAL_DEATH_DATE", "INHOSPITAL_DEATH_CODE", "DEATH_DATE", "EXTERNAL_DEATH_PROCESS_ID" FROM "DTM_622"."PATIENT") x) [numPartitions=1] (7)
+- == Initial Plan ==
HashAggregate (27)
+- Exchange (26)
+- HashAggregate (25)
+- Project (24)
+- SortMergeJoin LeftOuter (23)
:- Sort (20)
: +- Exchange (19)
: +- Project (2)
: +- Scan JDBCRelation((SELECT RAWTOHEX(VISIT_UNIT_ID), RAWTOHEX(VISIT_ID), RAWTOHEX(PATIENT_ID), "UNIT", "ACTIVITY", "IN_DATE", "OUT_DATE" FROM "DTM_622"."VISIT_UNIT") x) [numPartitions=1] (1)
+- Sort (22)
+- Exchange (21)
+- Project (8)
+- Scan JDBCRelation((SELECT RAWTOHEX(PATIENT_ID), "BIRTH_DATE", "GENDER", "PSEUDO", "INHOSPITAL_DEATH_DATE", "INHOSPITAL_DEATH_CODE", "DEATH_DATE", "EXTERNAL_DEATH_PROCESS_ID" FROM "DTM_622"."PATIENT") x) [numPartitions=1] (7)
(1) Scan JDBCRelation((SELECT RAWTOHEX(VISIT_UNIT_ID), RAWTOHEX(VISIT_ID), RAWTOHEX(PATIENT_ID), "UNIT", "ACTIVITY", "IN_DATE", "OUT_DATE" FROM "DTM_622"."VISIT_UNIT") x) [numPartitions=1] [codegen id : 1]
Output [1]: [RAWTOHEX(PATIENT_ID)#53857]
ReadSchema: struct<RAWTOHEX(PATIENT_ID):string>
(2) Project [codegen id : 1]
Output [1]: [RAWTOHEX(PATIENT_ID)#53857 AS COL_FC9902B4_8859_4AF9_ADF1_99A2E15E5351#53969]
Input [1]: [RAWTOHEX(PATIENT_ID)#53857]
(3) Exchange
Input [1]: [COL_FC9902B4_8859_4AF9_ADF1_99A2E15E5351#53969]
Arguments: hashpartitioning(COL_FC9902B4_8859_4AF9_ADF1_99A2E15E5351#53969, 10), ENSURE_REQUIREMENTS, [plan_id=8300]
(4) ShuffleQueryStage
Output [1]: [COL_FC9902B4_8859_4AF9_ADF1_99A2E15E5351#53969]
Arguments: 0
(5) AQEShuffleRead
Input [1]: [COL_FC9902B4_8859_4AF9_ADF1_99A2E15E5351#53969]
Arguments: coalesced
(6) Sort [codegen id : 3]
Input [1]: [COL_FC9902B4_8859_4AF9_ADF1_99A2E15E5351#53969]
Arguments: [COL_FC9902B4_8859_4AF9_ADF1_99A2E15E5351#53969 ASC NULLS FIRST], false, 0
(7) Scan JDBCRelation((SELECT RAWTOHEX(PATIENT_ID), "BIRTH_DATE", "GENDER", "PSEUDO", "INHOSPITAL_DEATH_DATE", "INHOSPITAL_DEATH_CODE", "DEATH_DATE", "EXTERNAL_DEATH_PROCESS_ID" FROM "DTM_622"."PATIENT") x) [numPartitions=1] [codegen id : 2]
Output [1]: [RAWTOHEX(PATIENT_ID)#53695]
PushedFilters: [*IsNotNull(RAWTOHEX(PATIENT_ID))]
ReadSchema: struct<RAWTOHEX(PATIENT_ID):string>
(8) Project [codegen id : 2]
Output [1]: [RAWTOHEX(PATIENT_ID)#53695 AS PATIENT_3332_PATIENT_ID_3333#54153]
Input [1]: [RAWTOHEX(PATIENT_ID)#53695]
(9) Exchange
Input [1]: [PATIENT_3332_PATIENT_ID_3333#54153]
Arguments: hashpartitioning(PATIENT_3332_PATIENT_ID_3333#54153, 10), ENSURE_REQUIREMENTS, [plan_id=8307]
(10) ShuffleQueryStage
Output [1]: [PATIENT_3332_PATIENT_ID_3333#54153]
Arguments: 1
(11) AQEShuffleRead
Input [1]: [PATIENT_3332_PATIENT_ID_3333#54153]
Arguments: coalesced
(12) Sort [codegen id : 4]
Input [1]: [PATIENT_3332_PATIENT_ID_3333#54153]
Arguments: [PATIENT_3332_PATIENT_ID_3333#54153 ASC NULLS FIRST], false, 0
(13) SortMergeJoin [codegen id : 5]
Left keys [1]: [COL_FC9902B4_8859_4AF9_ADF1_99A2E15E5351#53969]
Right keys [1]: [PATIENT_3332_PATIENT_ID_3333#54153]
Join type: LeftOuter
Join condition: None
(14) Project [codegen id : 5]
Output: []
Input [2]: [COL_FC9902B4_8859_4AF9_ADF1_99A2E15E5351#53969, PATIENT_3332_PATIENT_ID_3333#54153]
(15) HashAggregate [codegen id : 5]
Input: []
Keys: []
Functions [1]: [partial_count(1)]
Aggregate Attributes [1]: [count#54274L]
Results [1]: [count#54275L]
(16) Exchange
Input [1]: [count#54275L]
Arguments: SinglePartition, ENSURE_REQUIREMENTS, [plan_id=8465]
(17) ShuffleQueryStage
Output [1]: [count#54275L]
Arguments: 2
(18) HashAggregate [codegen id : 6]
Input [1]: [count#54275L]
Keys: []
Functions [1]: [count(1)]
Aggregate Attributes [1]: [count(1)#54271L]
Results [1]: [count(1)#54271L AS count#54272L]
(19) Exchange
Input [1]: [COL_FC9902B4_8859_4AF9_ADF1_99A2E15E5351#53969]
Arguments: hashpartitioning(COL_FC9902B4_8859_4AF9_ADF1_99A2E15E5351#53969, 10), ENSURE_REQUIREMENTS, [plan_id=8266]
(20) Sort
Input [1]: [COL_FC9902B4_8859_4AF9_ADF1_99A2E15E5351#53969]
Arguments: [COL_FC9902B4_8859_4AF9_ADF1_99A2E15E5351#53969 ASC NULLS FIRST], false, 0
(21) Exchange
Input [1]: [PATIENT_3332_PATIENT_ID_3333#54153]
Arguments: hashpartitioning(PATIENT_3332_PATIENT_ID_3333#54153, 10), ENSURE_REQUIREMENTS, [plan_id=8267]
(22) Sort
Input [1]: [PATIENT_3332_PATIENT_ID_3333#54153]
Arguments: [PATIENT_3332_PATIENT_ID_3333#54153 ASC NULLS FIRST], false, 0
(23) SortMergeJoin
Left keys [1]: [COL_FC9902B4_8859_4AF9_ADF1_99A2E15E5351#53969]
Right keys [1]: [PATIENT_3332_PATIENT_ID_3333#54153]
Join type: LeftOuter
Join condition: None
(24) Project
Output: []
Input [2]: [COL_FC9902B4_8859_4AF9_ADF1_99A2E15E5351#53969, PATIENT_3332_PATIENT_ID_3333#54153]
(25) HashAggregate
Input: []
Keys: []
Functions [1]: [partial_count(1)]
Aggregate Attributes [1]: [count#54274L]
Results [1]: [count#54275L]
(26) Exchange
Input [1]: [count#54275L]
Arguments: SinglePartition, ENSURE_REQUIREMENTS, [plan_id=8274]
(27) HashAggregate
Input [1]: [count#54275L]
Keys: []
Functions [1]: [count(1)]
Aggregate Attributes [1]: [count(1)#54271L]
Results [1]: [count(1)#54271L AS count#54272L]
(28) AdaptiveSparkPlan
Output [1]: [count#54272L]
Arguments: isFinalPlan=true