digraph G {
0 [labelType="html" label="<br><b>TakeOrderedAndProject</b><br><br>"];
subgraph cluster1 {
isCluster="true";
label="WholeStageCodegen (6)\n \nduration: total (min, med, max (stageId: taskId))\n264 ms (0 ms, 0 ms, 24 ms (stage 31.0: task 2066))";
2 [labelType="html" label="<b>HashAggregate</b><br><br>time in aggregation build total (min, med, max (stageId: taskId))<br>80 ms (0 ms, 0 ms, 11 ms (stage 31.0: task 2066))<br>peak memory total (min, med, max (stageId: taskId))<br>1842.0 MiB (256.0 KiB, 256.0 KiB, 64.3 MiB (stage 31.0: task 2046))<br>number of output rows: 31<br>avg hash probe bucket list iters (min, med, max (stageId: taskId)):<br>(1, 1, 1 (stage 31.0: task 2046))"];
}
3 [labelType="html" label="<b>Exchange</b><br><br>shuffle records written: 6,200<br>shuffle write time total (min, med, max (stageId: taskId))<br>845 ms (3 ms, 3 ms, 7 ms (stage 30.0: task 1957))<br>records read: 6,200<br>local bytes read total (min, med, max (stageId: taskId))<br>244.2 KiB (0.0 B, 0.0 B, 15.0 KiB (stage 31.0: task 2054))<br>fetch wait time total (min, med, max (stageId: taskId))<br>11 ms (0 ms, 0 ms, 8 ms (stage 31.0: task 2066))<br>remote bytes read total (min, med, max (stageId: taskId))<br>213.3 KiB (0.0 B, 0.0 B, 10.3 KiB (stage 31.0: task 2050))<br>local blocks read: 2,974<br>remote blocks read: 2,626<br>data size total (min, med, max (stageId: taskId))<br>242.2 KiB (1240.0 B, 1240.0 B, 1240.0 B (stage 30.0: task 1847))<br>shuffle bytes written total (min, med, max (stageId: taskId))<br>457.5 KiB (2.3 KiB, 2.3 KiB, 2.3 KiB (stage 30.0: task 2006))"];
subgraph cluster4 {
isCluster="true";
label="WholeStageCodegen (5)\n \nduration: total (min, med, max (stageId: taskId))\n1.7 s (5 ms, 5 ms, 54 ms (stage 30.0: task 1932))";
5 [labelType="html" label="<b>HashAggregate</b><br><br>time in aggregation build total (min, med, max (stageId: taskId))<br>328 ms (1 ms, 1 ms, 25 ms (stage 30.0: task 2040))<br>peak memory total (min, med, max (stageId: taskId))<br>50.0 MiB (256.0 KiB, 256.0 KiB, 256.0 KiB (stage 30.0: task 1847))<br>number of output rows: 6,200"];
6 [labelType="html" label="<br><b>Project</b><br><br>"];
7 [labelType="html" label="<b>SortMergeJoin</b><br><br>number of output rows: 72,118"];
}
subgraph cluster8 {
isCluster="true";
label="WholeStageCodegen (2)\n \nduration: total (min, med, max (stageId: taskId))\n678 ms (0 ms, 3 ms, 43 ms (stage 30.0: task 1847))";
9 [labelType="html" label="<b>Sort</b><br><br>sort time total (min, med, max (stageId: taskId))<br>0 ms (0 ms, 0 ms, 0 ms (stage 30.0: task 1847))<br>peak memory total (min, med, max (stageId: taskId))<br>12.5 GiB (64.1 MiB, 64.1 MiB, 64.1 MiB (stage 30.0: task 1847))<br>spill size total (min, med, max (stageId: taskId))<br>0.0 B (0.0 B, 0.0 B, 0.0 B (stage 30.0: task 1847))"];
}
10 [labelType="html" label="<b>Exchange</b><br><br>shuffle records written: 171,282<br>shuffle write time total (min, med, max (stageId: taskId))<br>45 ms (16 ms, 29 ms, 29 ms (stage 28.0: task 1840))<br>records read: 171,282<br>local bytes read total (min, med, max (stageId: taskId))<br>5.8 MiB (24.4 KiB, 29.4 KiB, 34.6 KiB (stage 30.0: task 1955))<br>fetch wait time total (min, med, max (stageId: taskId))<br>31 ms (0 ms, 0 ms, 23 ms (stage 30.0: task 2040))<br>remote bytes read total (min, med, max (stageId: taskId))<br>5.7 MiB (24.5 KiB, 28.7 KiB, 34.1 KiB (stage 30.0: task 1935))<br>local blocks read: 200<br>remote blocks read: 200<br>data size total (min, med, max (stageId: taskId))<br>17.0 MiB (8.2 MiB, 8.8 MiB, 8.8 MiB (stage 28.0: task 1839))<br>shuffle bytes written total (min, med, max (stageId: taskId))<br>11.4 MiB (5.5 MiB, 6.0 MiB, 6.0 MiB (stage 28.0: task 1839))"];
subgraph cluster11 {
isCluster="true";
label="WholeStageCodegen (1)\n \nduration: total (min, med, max (stageId: taskId))\n3.1 s (1.3 s, 1.8 s, 1.8 s (stage 28.0: task 1840))";
12 [labelType="html" label="<br><b>Project</b><br><br>"];
13 [labelType="html" label="<b>Filter</b><br><br>number of output rows: 171,282"];
}
14 [labelType="html" label="<b>Scan csv </b><br><br>number of files read: 1<br>metadata time: 0 ms<br>size of files read: 173.6 MiB<br>number of output rows: 171,282"];
subgraph cluster15 {
isCluster="true";
label="WholeStageCodegen (4)\n \nduration: total (min, med, max (stageId: taskId))\n908 ms (0 ms, 3 ms, 176 ms (stage 30.0: task 1846))";
16 [labelType="html" label="<b>Sort</b><br><br>sort time total (min, med, max (stageId: taskId))<br>0 ms (0 ms, 0 ms, 0 ms (stage 30.0: task 1847))<br>peak memory total (min, med, max (stageId: taskId))<br>12.5 GiB (64.1 MiB, 64.1 MiB, 64.1 MiB (stage 30.0: task 1847))<br>spill size total (min, med, max (stageId: taskId))<br>0.0 B (0.0 B, 0.0 B, 0.0 B (stage 30.0: task 1847))"];
}
17 [labelType="html" label="<b>Exchange</b><br><br>shuffle records written: 156,095<br>shuffle write time total (min, med, max (stageId: taskId))<br>47 ms (0 ms, 0 ms, 34 ms (stage 29.0: task 1844))<br>records read: 156,095<br>local bytes read total (min, med, max (stageId: taskId))<br>4.6 MiB (15.9 KiB, 19.3 KiB, 36.0 KiB (stage 30.0: task 1916))<br>fetch wait time total (min, med, max (stageId: taskId))<br>0 ms (0 ms, 0 ms, 0 ms (stage 30.0: task 1847))<br>remote bytes read total (min, med, max (stageId: taskId))<br>5.4 MiB (16.1 KiB, 32.0 KiB, 37.5 KiB (stage 30.0: task 1918))<br>local blocks read: 200<br>remote blocks read: 200<br>data size total (min, med, max (stageId: taskId))<br>16.7 MiB (0.0 B, 0.0 B, 10.7 MiB (stage 29.0: task 1844))<br>shuffle bytes written total (min, med, max (stageId: taskId))<br>10.0 MiB (0.0 B, 0.0 B, 6.4 MiB (stage 29.0: task 1844))"];
subgraph cluster18 {
isCluster="true";
label="WholeStageCodegen (3)\n \nduration: total (min, med, max (stageId: taskId))\n8.8 s (131 ms, 1.6 s, 3.0 s (stage 29.0: task 1844))";
19 [labelType="html" label="<br><b>Project</b><br><br>"];
20 [labelType="html" label="<b>Filter</b><br><br>number of output rows: 156,095"];
}
21 [labelType="html" label="<b>Scan csv </b><br><br>number of files read: 1<br>metadata time: 0 ms<br>size of files read: 519.0 MiB<br>number of output rows: 500,001"];
2->0;
3->2;
5->3;
6->5;
7->6;
9->7;
10->9;
12->10;
13->12;
14->13;
16->7;
17->16;
19->17;
20->19;
21->20;
}
22
TakeOrderedAndProject(limit=21, orderBy=[formatted_date#136 ASC NULLS FIRST], output=[formatted_date#136,total_transaction_fee#440])
HashAggregate(keys=[formatted_date#136], functions=[sum(cast((cast(gas#78 as float) * cast(gas_price#79L as float)) as double))])
WholeStageCodegen (6)
Exchange hashpartitioning(formatted_date#136, 200), true, [id=#428]
HashAggregate(keys=[formatted_date#136], functions=[partial_sum(cast((cast(gas#78 as float) * cast(gas_price#79L as float)) as double))])
Project [gas#78, gas_price#79L, formatted_date#136]
SortMergeJoin [block_hash#72], [hash#17], Inner
WholeStageCodegen (5)
Sort [block_hash#72 ASC NULLS FIRST], false, 0
WholeStageCodegen (2)
Exchange hashpartitioning(block_hash#72, 200), true, [id=#410]
Project [block_hash#72, gas#78, gas_price#79L]
Filter ((isnotnull(transaction_index#74) AND (transaction_index#74 = 0)) AND isnotnull(block_hash#72))
WholeStageCodegen (1)
FileScan csv [block_hash#72,transaction_index#74,gas#78,gas_price#79L] Batched: false, DataFilters: [isnotnull(transaction_index#74), (transaction_index#74 = 0), isnotnull(block_hash#72)], Format: CSV, Location: InMemoryFileIndex[s3a://data-repository-bkt/ECS765/ethereum/transactions.csv], PartitionFilters: [], PushedFilters: [IsNotNull(transaction_index), EqualTo(transaction_index,0), IsNotNull(block_hash)], ReadSchema: struct<block_hash:string,transaction_index:int,gas:int,gas_price:bigint>
Sort [hash#17 ASC NULLS FIRST], false, 0
WholeStageCodegen (4)
Exchange hashpartitioning(hash#17, 200), true, [id=#419]
Project [hash#17, date_format(cast(from_unixtime(cast(timestamp#32 as bigint), yyyy-MM-dd HH:mm:ss, Some(GMT)) as timestamp), yyyy-MM-dd, Some(GMT)) AS formatted_date#136]
Filter ((date_format(cast(from_unixtime(cast(timestamp#32 as bigint), yyyy-MM-dd HH:mm:ss, Some(GMT)) as timestamp), yyyy-MM, Some(GMT)) = 2015-10) AND isnotnull(hash#17))
WholeStageCodegen (3)
FileScan csv [hash#17,timestamp#32] Batched: false, DataFilters: [(date_format(cast(from_unixtime(cast(timestamp#32 as bigint), yyyy-MM-dd HH:mm:ss, Some(GMT)) as..., Format: CSV, Location: InMemoryFileIndex[s3a://data-repository-bkt/ECS765/ethereum/blocks.csv], PartitionFilters: [], PushedFilters: [IsNotNull(hash)], ReadSchema: struct<hash:string,timestamp:int>
== Parsed Logical Plan ==
GlobalLimit 21
+- LocalLimit 21
+- Project [cast(formatted_date#136 as string) AS formatted_date#439, cast(total_transaction_fee#434 as string) AS total_transaction_fee#440]
+- Sort [formatted_date#136 ASC NULLS FIRST], true
+- Aggregate [formatted_date#136], [formatted_date#136, sum(cast((cast(gas#78 as float) * cast(gas_price#79L as float)) as double)) AS total_transaction_fee#434]
+- Filter (transaction_index#74 = 0)
+- Filter (date_format(cast(from_unixtime(cast(timestamp#32 as bigint), yyyy-MM-dd HH:mm:ss, Some(GMT)) as timestamp), yyyy-MM, Some(GMT)) = 2015-10)
+- Join Inner, (block_hash#72 = hash#17)
:- Relation[hash#70,nonce#71,block_hash#72,block_number#73,transaction_index#74,from_address#75,to_address#76,value#77,gas#78,gas_price#79L,input#80,block_timestamp#81,max_fee_per_gas#82,max_priority_fee_per_gas#83,transaction_type#84] csv
+- Project [number#16, hash#17, parent_hash#18, nonce#19, sha3_uncles#20, logs_bloom#21, transactions_root#22, state_root#23, receipts_root#24, miner#25, difficulty#26L, total_difficulty#27, size#28, extra_data#29, gas_limit#30, gas_used#31, timestamp#32, transaction_count#33, base_fee_per_gas#34, date_format(cast(from_unixtime(cast(timestamp#32 as bigint), yyyy-MM-dd HH:mm:ss, Some(GMT)) as timestamp), yyyy-MM-dd, Some(GMT)) AS formatted_date#136]
+- Relation[number#16,hash#17,parent_hash#18,nonce#19,sha3_uncles#20,logs_bloom#21,transactions_root#22,state_root#23,receipts_root#24,miner#25,difficulty#26L,total_difficulty#27,size#28,extra_data#29,gas_limit#30,gas_used#31,timestamp#32,transaction_count#33,base_fee_per_gas#34] csv
== Analyzed Logical Plan ==
formatted_date: string, total_transaction_fee: string
GlobalLimit 21
+- LocalLimit 21
+- Project [cast(formatted_date#136 as string) AS formatted_date#439, cast(total_transaction_fee#434 as string) AS total_transaction_fee#440]
+- Sort [formatted_date#136 ASC NULLS FIRST], true
+- Aggregate [formatted_date#136], [formatted_date#136, sum(cast((cast(gas#78 as float) * cast(gas_price#79L as float)) as double)) AS total_transaction_fee#434]
+- Filter (transaction_index#74 = 0)
+- Filter (date_format(cast(from_unixtime(cast(timestamp#32 as bigint), yyyy-MM-dd HH:mm:ss, Some(GMT)) as timestamp), yyyy-MM, Some(GMT)) = 2015-10)
+- Join Inner, (block_hash#72 = hash#17)
:- Relation[hash#70,nonce#71,block_hash#72,block_number#73,transaction_index#74,from_address#75,to_address#76,value#77,gas#78,gas_price#79L,input#80,block_timestamp#81,max_fee_per_gas#82,max_priority_fee_per_gas#83,transaction_type#84] csv
+- Project [number#16, hash#17, parent_hash#18, nonce#19, sha3_uncles#20, logs_bloom#21, transactions_root#22, state_root#23, receipts_root#24, miner#25, difficulty#26L, total_difficulty#27, size#28, extra_data#29, gas_limit#30, gas_used#31, timestamp#32, transaction_count#33, base_fee_per_gas#34, date_format(cast(from_unixtime(cast(timestamp#32 as bigint), yyyy-MM-dd HH:mm:ss, Some(GMT)) as timestamp), yyyy-MM-dd, Some(GMT)) AS formatted_date#136]
+- Relation[number#16,hash#17,parent_hash#18,nonce#19,sha3_uncles#20,logs_bloom#21,transactions_root#22,state_root#23,receipts_root#24,miner#25,difficulty#26L,total_difficulty#27,size#28,extra_data#29,gas_limit#30,gas_used#31,timestamp#32,transaction_count#33,base_fee_per_gas#34] csv
== Optimized Logical Plan ==
GlobalLimit 21
+- LocalLimit 21
+- Project [formatted_date#136, cast(total_transaction_fee#434 as string) AS total_transaction_fee#440]
+- Sort [formatted_date#136 ASC NULLS FIRST], true
+- Aggregate [formatted_date#136], [formatted_date#136, sum(cast((cast(gas#78 as float) * cast(gas_price#79L as float)) as double)) AS total_transaction_fee#434]
+- Project [gas#78, gas_price#79L, formatted_date#136]
+- Join Inner, (block_hash#72 = hash#17)
:- Project [block_hash#72, gas#78, gas_price#79L]
: +- Filter ((isnotnull(transaction_index#74) AND (transaction_index#74 = 0)) AND isnotnull(block_hash#72))
: +- Relation[hash#70,nonce#71,block_hash#72,block_number#73,transaction_index#74,from_address#75,to_address#76,value#77,gas#78,gas_price#79L,input#80,block_timestamp#81,max_fee_per_gas#82,max_priority_fee_per_gas#83,transaction_type#84] csv
+- Project [hash#17, date_format(cast(from_unixtime(cast(timestamp#32 as bigint), yyyy-MM-dd HH:mm:ss, Some(GMT)) as timestamp), yyyy-MM-dd, Some(GMT)) AS formatted_date#136]
+- Filter ((date_format(cast(from_unixtime(cast(timestamp#32 as bigint), yyyy-MM-dd HH:mm:ss, Some(GMT)) as timestamp), yyyy-MM, Some(GMT)) = 2015-10) AND isnotnull(hash#17))
+- Relation[number#16,hash#17,parent_hash#18,nonce#19,sha3_uncles#20,logs_bloom#21,transactions_root#22,state_root#23,receipts_root#24,miner#25,difficulty#26L,total_difficulty#27,size#28,extra_data#29,gas_limit#30,gas_used#31,timestamp#32,transaction_count#33,base_fee_per_gas#34] csv
== Physical Plan ==
TakeOrderedAndProject(limit=21, orderBy=[formatted_date#136 ASC NULLS FIRST], output=[formatted_date#136,total_transaction_fee#440])
+- *(6) HashAggregate(keys=[formatted_date#136], functions=[sum(cast((cast(gas#78 as float) * cast(gas_price#79L as float)) as double))], output=[formatted_date#136, total_transaction_fee#434])
+- Exchange hashpartitioning(formatted_date#136, 200), true, [id=#428]
+- *(5) HashAggregate(keys=[formatted_date#136], functions=[partial_sum(cast((cast(gas#78 as float) * cast(gas_price#79L as float)) as double))], output=[formatted_date#136, sum#444])
+- *(5) Project [gas#78, gas_price#79L, formatted_date#136]
+- *(5) SortMergeJoin [block_hash#72], [hash#17], Inner
:- *(2) Sort [block_hash#72 ASC NULLS FIRST], false, 0
: +- Exchange hashpartitioning(block_hash#72, 200), true, [id=#410]
: +- *(1) Project [block_hash#72, gas#78, gas_price#79L]
: +- *(1) Filter ((isnotnull(transaction_index#74) AND (transaction_index#74 = 0)) AND isnotnull(block_hash#72))
: +- FileScan csv [block_hash#72,transaction_index#74,gas#78,gas_price#79L] Batched: false, DataFilters: [isnotnull(transaction_index#74), (transaction_index#74 = 0), isnotnull(block_hash#72)], Format: CSV, Location: InMemoryFileIndex[s3a://data-repository-bkt/ECS765/ethereum/transactions.csv], PartitionFilters: [], PushedFilters: [IsNotNull(transaction_index), EqualTo(transaction_index,0), IsNotNull(block_hash)], ReadSchema: struct<block_hash:string,transaction_index:int,gas:int,gas_price:bigint>
+- *(4) Sort [hash#17 ASC NULLS FIRST], false, 0
+- Exchange hashpartitioning(hash#17, 200), true, [id=#419]
+- *(3) Project [hash#17, date_format(cast(from_unixtime(cast(timestamp#32 as bigint), yyyy-MM-dd HH:mm:ss, Some(GMT)) as timestamp), yyyy-MM-dd, Some(GMT)) AS formatted_date#136]
+- *(3) Filter ((date_format(cast(from_unixtime(cast(timestamp#32 as bigint), yyyy-MM-dd HH:mm:ss, Some(GMT)) as timestamp), yyyy-MM, Some(GMT)) = 2015-10) AND isnotnull(hash#17))
+- FileScan csv [hash#17,timestamp#32] Batched: false, DataFilters: [(date_format(cast(from_unixtime(cast(timestamp#32 as bigint), yyyy-MM-dd HH:mm:ss, Some(GMT)) as..., Format: CSV, Location: InMemoryFileIndex[s3a://data-repository-bkt/ECS765/ethereum/blocks.csv], PartitionFilters: [], PushedFilters: [IsNotNull(hash)], ReadSchema: struct<hash:string,timestamp:int>