digraph G {
0 [labelType="html" label="<br><b>AdaptiveSparkPlan</b><br><br>"];
subgraph cluster1 {
isCluster="true";
label="WholeStageCodegen (2)\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 total (min, med, max (stageId: taskId))<br>0 ms (0 ms, 0 ms, 0 ms (stage 3258.0: task 3097))<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 total (min, med, max (stageId: taskId))<br>16.0 B (0.0 B, 16.0 B, 16.0 B (stage 3258.0: task 3097))<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 total (min, med, max (stageId: taskId))<br>59.0 B (0.0 B, 59.0 B, 59.0 B (stage 3258.0: task 3097))"];
subgraph cluster4 {
isCluster="true";
label="WholeStageCodegen (1)\n \nduration: 0 ms";
5 [labelType="html" label="<b>HashAggregate</b><br><br>time in aggregation build: 0 ms<br>number of output rows: 1"];
}
6 [labelType="html" label="<b>InMemoryTableScan</b><br><br>number of output rows: 162"];
subgraph cluster7 {
isCluster="true";
label="WholeStageCodegen (1)\n \nduration: total (min, med, max (stageId: taskId))\n2 ms (0 ms, 2 ms, 2 ms (stage 3254.0: task 3093))";
8 [labelType="html" label="<b>Scan JDBCRelation((SELECT * FROM dbo.fact_cm_country_analysis WHERE bigid BETWEEN 1 AND 162) AS page) [numPartitions=1] </b><br><br>number of output rows: 162"];
}
2->0;
3->2;
5->3;
6->5;
8->6;
}
9
AdaptiveSparkPlan isFinalPlan=true
HashAggregate(keys=[], functions=[count(1)])
WholeStageCodegen (2)
Exchange SinglePartition, ENSURE_REQUIREMENTS, [plan_id=48476]
HashAggregate(keys=[], functions=[partial_count(1)])
WholeStageCodegen (1)
InMemoryTableScan
Scan JDBCRelation((SELECT * FROM dbo.fact_cm_country_analysis WHERE bigid BETWEEN 1 AND 162) AS page) [numPartitions=1] [company_id#1017701,reporting_year#1017702,country_code#1017703,country_name#1017704,total_smelters#1017705,conflict_free_count#1017706,audit_committed_count#1017707,undeterminable_count#1017708,active_smelters#1017709,minerals_list#1017710,is_drc_covered#1017711,etl_runtime#1017712,bigid#1017713L] PushedFilters: [], ReadSchema: struct<company_id:string,reporting_year:int,country_code:string,country_name:string,total_smelter...
WholeStageCodegen (1)
== Physical Plan ==
AdaptiveSparkPlan (12)
+- == Final Plan ==
* HashAggregate (8)
+- ShuffleQueryStage (7), Statistics(sizeInBytes=16.0 B, rowCount=1)
+- Exchange (6)
+- * HashAggregate (5)
+- TableCacheQueryStage (4), Statistics(sizeInBytes=19.3 KiB, rowCount=162)
+- InMemoryTableScan (1)
+- InMemoryRelation (2)
+- * Scan JDBCRelation((SELECT * FROM dbo.fact_cm_country_analysis WHERE bigid BETWEEN 1 AND 162) AS page) [numPartitions=1] (3)
+- == Initial Plan ==
HashAggregate (11)
+- Exchange (10)
+- HashAggregate (9)
+- InMemoryTableScan (1)
+- InMemoryRelation (2)
+- * Scan JDBCRelation((SELECT * FROM dbo.fact_cm_country_analysis WHERE bigid BETWEEN 1 AND 162) AS page) [numPartitions=1] (3)
(1) InMemoryTableScan
Output: []
(2) InMemoryRelation
Arguments: [company_id#1017701, reporting_year#1017702, country_code#1017703, country_name#1017704, total_smelters#1017705, conflict_free_count#1017706, audit_committed_count#1017707, undeterminable_count#1017708, active_smelters#1017709, minerals_list#1017710, is_drc_covered#1017711, etl_runtime#1017712, bigid#1017713L], CachedRDDBuilder(org.apache.spark.sql.execution.columnar.DefaultCachedBatchSerializer@730ae8bf,StorageLevel(disk, memory, deserialized, 1 replicas),*(1) Scan JDBCRelation((SELECT * FROM dbo.fact_cm_country_analysis WHERE bigid BETWEEN 1 AND 162) AS page) [numPartitions=1] [company_id#1017701,reporting_year#1017702,country_code#1017703,country_name#1017704,total_smelters#1017705,conflict_free_count#1017706,audit_committed_count#1017707,undeterminable_count#1017708,active_smelters#1017709,minerals_list#1017710,is_drc_covered#1017711,etl_runtime#1017712,bigid#1017713L] PushedFilters: [], ReadSchema: struct<company_id:string,reporting_year:int,country_code:string,country_name:string,total_smelter...
,None)
(3) Scan JDBCRelation((SELECT * FROM dbo.fact_cm_country_analysis WHERE bigid BETWEEN 1 AND 162) AS page) [numPartitions=1] [codegen id : 1]
Output [13]: [company_id#1017701, reporting_year#1017702, country_code#1017703, country_name#1017704, total_smelters#1017705, conflict_free_count#1017706, audit_committed_count#1017707, undeterminable_count#1017708, active_smelters#1017709, minerals_list#1017710, is_drc_covered#1017711, etl_runtime#1017712, bigid#1017713L]
ReadSchema: struct<company_id:string,reporting_year:int,country_code:string,country_name:string,total_smelters:int,conflict_free_count:int,audit_committed_count:int,undeterminable_count:int,active_smelters:int,minerals_list:string,is_drc_covered:int,etl_runtime:timestamp,bigid:bigint>
(4) TableCacheQueryStage
Output: []
Arguments: 0
(5) HashAggregate [codegen id : 1]
Input: []
Keys: []
Functions [1]: [partial_count(1)]
Aggregate Attributes [1]: [count#1018003L]
Results [1]: [count#1018004L]
(6) Exchange
Input [1]: [count#1018004L]
Arguments: SinglePartition, ENSURE_REQUIREMENTS, [plan_id=48476]
(7) ShuffleQueryStage
Output [1]: [count#1018004L]
Arguments: 1
(8) HashAggregate [codegen id : 2]
Input [1]: [count#1018004L]
Keys: []
Functions [1]: [count(1)]
Aggregate Attributes [1]: [count(1)#1017805L]
Results [1]: [count(1)#1017805L AS count#1017806L]
(9) HashAggregate
Input: []
Keys: []
Functions [1]: [partial_count(1)]
Aggregate Attributes [1]: [count#1018003L]
Results [1]: [count#1018004L]
(10) Exchange
Input [1]: [count#1018004L]
Arguments: SinglePartition, ENSURE_REQUIREMENTS, [plan_id=48377]
(11) HashAggregate
Input [1]: [count#1018004L]
Keys: []
Functions [1]: [count(1)]
Aggregate Attributes [1]: [count(1)#1017805L]
Results [1]: [count(1)#1017805L AS count#1017806L]
(12) AdaptiveSparkPlan
Output [1]: [count#1017806L]
Arguments: isFinalPlan=true