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))\n316 ms (0 ms, 0 ms, 20 ms (stage 19.0: task 1040))";
2 [labelType="html" label="<b>HashAggregate</b><br><br>time in aggregation build total (min, med, max (stageId: taskId))<br>127 ms (0 ms, 0 ms, 9 ms (stage 19.0: task 1040))<br>peak memory total (min, med, max (stageId: taskId))<br>1842.0 MiB (256.0 KiB, 256.0 KiB, 64.3 MiB (stage 19.0: task 1038))<br>number of output rows: 31<br>avg hash probe bucket list iters (min, med, max (stageId: taskId)):<br>(1, 1, 1 (stage 19.0: task 1038))"];
}
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>897 ms (3 ms, 4 ms, 7 ms (stage 18.0: task 1025))<br>records read: 6,200<br>local bytes read total (min, med, max (stageId: taskId))<br>177.6 KiB (0.0 B, 0.0 B, 8.1 KiB (stage 19.0: task 1042))<br>fetch wait time total (min, med, max (stageId: taskId))<br>3 ms (0 ms, 0 ms, 1 ms (stage 19.0: task 1040))<br>remote bytes read total (min, med, max (stageId: taskId))<br>177.3 KiB (0.0 B, 0.0 B, 8.1 KiB (stage 19.0: task 1055))<br>local blocks read: 2,800<br>remote blocks read: 2,800<br>data size total (min, med, max (stageId: taskId))<br>145.3 KiB (744.0 B, 744.0 B, 744.0 B (stage 18.0: task 838))<br>shuffle bytes written total (min, med, max (stageId: taskId))<br>354.9 KiB (1810.0 B, 1817.0 B, 1826.0 B (stage 18.0: task 846))"];
subgraph cluster4 {
isCluster="true";
label="WholeStageCodegen (5)\n \nduration: total (min, med, max (stageId: taskId))\n1.4 s (5 ms, 7 ms, 26 ms (stage 18.0: task 839))";
5 [labelType="html" label="<b>HashAggregate</b><br><br>time in aggregation build total (min, med, max (stageId: taskId))<br>241 ms (1 ms, 1 ms, 4 ms (stage 18.0: task 845))<br>peak memory total (min, med, max (stageId: taskId))<br>50.0 MiB (256.0 KiB, 256.0 KiB, 256.0 KiB (stage 18.0: task 838))<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))\n710 ms (0 ms, 4 ms, 69 ms (stage 18.0: task 839))";
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 18.0: task 838))<br>peak memory total (min, med, max (stageId: taskId))<br>12.5 GiB (64.1 MiB, 64.1 MiB, 64.1 MiB (stage 18.0: task 838))<br>spill size total (min, med, max (stageId: taskId))<br>0.0 B (0.0 B, 0.0 B, 0.0 B (stage 18.0: task 838))"];
}
10 [labelType="html" label="<b>Exchange</b><br><br>shuffle records written: 156,095<br>shuffle write time total (min, med, max (stageId: taskId))<br>34 ms (0 ms, 0 ms, 17 ms (stage 16.0: task 834))<br>records read: 156,095<br>local bytes read total (min, med, max (stageId: taskId))<br>4.9 MiB (16.0 KiB, 19.9 KiB, 36.5 KiB (stage 18.0: task 970))<br>fetch wait time total (min, med, max (stageId: taskId))<br>3 ms (0 ms, 0 ms, 3 ms (stage 18.0: task 845))<br>remote bytes read total (min, med, max (stageId: taskId))<br>5.1 MiB (16.2 KiB, 30.8 KiB, 37.7 KiB (stage 18.0: task 910))<br>local blocks read: 200<br>remote blocks read: 200<br>data size total (min, med, max (stageId: taskId))<br>14.3 MiB (0.0 B, 0.0 B, 9.2 MiB (stage 16.0: task 834))<br>shuffle bytes written total (min, med, max (stageId: taskId))<br>10.0 MiB (0.0 B, 0.0 B, 6.4 MiB (stage 16.0: task 834))"];
subgraph cluster11 {
isCluster="true";
label="WholeStageCodegen (1)\n \nduration: total (min, med, max (stageId: taskId))\n9.5 s (169 ms, 2.1 s, 2.6 s (stage 16.0: task 832))";
12 [labelType="html" label="<br><b>Project</b><br><br>"];
13 [labelType="html" label="<b>Filter</b><br><br>number of output rows: 156,095"];
}
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: 519.0 MiB<br>number of output rows: 500,001"];
subgraph cluster15 {
isCluster="true";
label="WholeStageCodegen (4)\n \nduration: total (min, med, max (stageId: taskId))\n611 ms (0 ms, 3 ms, 64 ms (stage 18.0: task 839))";
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 18.0: task 838))<br>peak memory total (min, med, max (stageId: taskId))<br>12.5 GiB (64.1 MiB, 64.1 MiB, 64.1 MiB (stage 18.0: task 838))<br>spill size total (min, med, max (stageId: taskId))<br>0.0 B (0.0 B, 0.0 B, 0.0 B (stage 18.0: task 838))"];
}
17 [labelType="html" label="<b>Exchange</b><br><br>shuffle records written: 171,282<br>shuffle write time total (min, med, max (stageId: taskId))<br>40 ms (17 ms, 23 ms, 23 ms (stage 17.0: task 836))<br>records read: 171,282<br>local bytes read total (min, med, max (stageId: taskId))<br>5.7 MiB (24.5 KiB, 29.2 KiB, 34.6 KiB (stage 18.0: task 947))<br>fetch wait time total (min, med, max (stageId: taskId))<br>0 ms (0 ms, 0 ms, 0 ms (stage 18.0: task 838))<br>remote bytes read total (min, med, max (stageId: taskId))<br>5.7 MiB (24.4 KiB, 29.0 KiB, 34.5 KiB (stage 18.0: task 1008))<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 17.0: task 836))<br>shuffle bytes written total (min, med, max (stageId: taskId))<br>11.4 MiB (5.5 MiB, 6.0 MiB, 6.0 MiB (stage 17.0: task 836))"];
subgraph cluster18 {
isCluster="true";
label="WholeStageCodegen (3)\n \nduration: total (min, med, max (stageId: taskId))\n3.0 s (1.3 s, 1.7 s, 1.7 s (stage 17.0: task 836))";
19 [labelType="html" label="<br><b>Project</b><br><br>"];
20 [labelType="html" label="<b>Filter</b><br><br>number of output rows: 171,282"];
}
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: 173.6 MiB<br>number of output rows: 171,282"];
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#114 ASC NULLS FIRST], output=[formatted_date#432,total_transaction_fee#433])
HashAggregate(keys=[formatted_date#114], functions=[sum((cast(gas#78 as bigint) * gas_price#79L))])
WholeStageCodegen (6)
Exchange hashpartitioning(formatted_date#114, 200), true, [id=#289]
HashAggregate(keys=[formatted_date#114], functions=[partial_sum((cast(gas#78 as bigint) * gas_price#79L))])
Project [formatted_date#114, gas#78, gas_price#79L]
SortMergeJoin [hash#17], [block_hash#72], Inner
WholeStageCodegen (5)
Sort [hash#17 ASC NULLS FIRST], false, 0
WholeStageCodegen (2)
Exchange hashpartitioning(hash#17, 200), true, [id=#271]
Project [hash#17, cast(from_unixtime(cast(timestamp#32 as bigint), yyyy-MM-dd HH:mm:ss, Some(GMT)) as date) AS formatted_date#114]
Filter (((cast(from_unixtime(cast(timestamp#32 as bigint), yyyy-MM-dd HH:mm:ss, Some(GMT)) as date) < 16740) AND (cast(from_unixtime(cast(timestamp#32 as bigint), yyyy-MM-dd HH:mm:ss, Some(GMT)) as date) > 16708)) AND isnotnull(hash#17))
WholeStageCodegen (1)
FileScan csv [hash#17,timestamp#32] Batched: false, DataFilters: [(cast(from_unixtime(cast(timestamp#32 as bigint), yyyy-MM-dd HH:mm:ss, Some(GMT)) as date) < 167..., Format: CSV, Location: InMemoryFileIndex[s3a://data-repository-bkt/ECS765/ethereum/blocks.csv], PartitionFilters: [], PushedFilters: [IsNotNull(hash)], ReadSchema: struct<hash:string,timestamp:int>
Sort [block_hash#72 ASC NULLS FIRST], false, 0
WholeStageCodegen (4)
Exchange hashpartitioning(block_hash#72, 200), true, [id=#280]
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 (3)
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>
== Parsed Logical Plan ==
GlobalLimit 21
+- LocalLimit 21
+- Project [cast(formatted_date#114 as string) AS formatted_date#432, cast(total_transaction_fee#427L as string) AS total_transaction_fee#433]
+- Sort [formatted_date#114 ASC NULLS FIRST], true
+- Aggregate [formatted_date#114], [formatted_date#114, sum((cast(gas#78 as bigint) * gas_price#79L)) AS total_transaction_fee#427L]
+- Filter (transaction_index#74 = 0)
+- Filter ((formatted_date#114 < cast(2015-11-01 as date)) AND (formatted_date#114 > cast(2015-09-30 as date)))
+- Project [number#16, 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, formatted_date#114, hash#70, nonce#71, block_hash#72, block_number#73, transaction_index#74, ... 10 more fields]
+- Join Inner, (hash#17 = block_hash#72)
:- 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, to_date(from_unixtime('timestamp, yyyy-MM-dd HH:mm:ss, None), None) AS formatted_date#114]
: +- 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
+- 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
== Analyzed Logical Plan ==
formatted_date: string, total_transaction_fee: string
GlobalLimit 21
+- LocalLimit 21
+- Project [cast(formatted_date#114 as string) AS formatted_date#432, cast(total_transaction_fee#427L as string) AS total_transaction_fee#433]
+- Sort [formatted_date#114 ASC NULLS FIRST], true
+- Aggregate [formatted_date#114], [formatted_date#114, sum((cast(gas#78 as bigint) * gas_price#79L)) AS total_transaction_fee#427L]
+- Filter (transaction_index#74 = 0)
+- Filter ((formatted_date#114 < cast(2015-11-01 as date)) AND (formatted_date#114 > cast(2015-09-30 as date)))
+- Project [number#16, 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, formatted_date#114, hash#70, nonce#71, block_hash#72, block_number#73, transaction_index#74, ... 10 more fields]
+- Join Inner, (hash#17 = block_hash#72)
:- 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, to_date(from_unixtime('timestamp, yyyy-MM-dd HH:mm:ss, None), None) AS formatted_date#114]
: +- 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
+- 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
== Optimized Logical Plan ==
GlobalLimit 21
+- LocalLimit 21
+- Project [cast(formatted_date#114 as string) AS formatted_date#432, cast(total_transaction_fee#427L as string) AS total_transaction_fee#433]
+- Sort [formatted_date#114 ASC NULLS FIRST], true
+- Aggregate [formatted_date#114], [formatted_date#114, sum((cast(gas#78 as bigint) * gas_price#79L)) AS total_transaction_fee#427L]
+- Project [formatted_date#114, gas#78, gas_price#79L]
+- Join Inner, (hash#17 = block_hash#72)
:- Project [hash#17, cast(from_unixtime(cast(timestamp#32 as bigint), yyyy-MM-dd HH:mm:ss, Some(GMT)) as date) AS formatted_date#114]
: +- Filter (((cast(from_unixtime(cast(timestamp#32 as bigint), yyyy-MM-dd HH:mm:ss, Some(GMT)) as date) < 16740) AND (cast(from_unixtime(cast(timestamp#32 as bigint), yyyy-MM-dd HH:mm:ss, Some(GMT)) as date) > 16708)) 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
+- 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
== Physical Plan ==
TakeOrderedAndProject(limit=21, orderBy=[formatted_date#114 ASC NULLS FIRST], output=[formatted_date#432,total_transaction_fee#433])
+- *(6) HashAggregate(keys=[formatted_date#114], functions=[sum((cast(gas#78 as bigint) * gas_price#79L))], output=[formatted_date#114, total_transaction_fee#427L])
+- Exchange hashpartitioning(formatted_date#114, 200), true, [id=#289]
+- *(5) HashAggregate(keys=[formatted_date#114], functions=[partial_sum((cast(gas#78 as bigint) * gas_price#79L))], output=[formatted_date#114, sum#437L])
+- *(5) Project [formatted_date#114, gas#78, gas_price#79L]
+- *(5) SortMergeJoin [hash#17], [block_hash#72], Inner
:- *(2) Sort [hash#17 ASC NULLS FIRST], false, 0
: +- Exchange hashpartitioning(hash#17, 200), true, [id=#271]
: +- *(1) Project [hash#17, cast(from_unixtime(cast(timestamp#32 as bigint), yyyy-MM-dd HH:mm:ss, Some(GMT)) as date) AS formatted_date#114]
: +- *(1) Filter (((cast(from_unixtime(cast(timestamp#32 as bigint), yyyy-MM-dd HH:mm:ss, Some(GMT)) as date) < 16740) AND (cast(from_unixtime(cast(timestamp#32 as bigint), yyyy-MM-dd HH:mm:ss, Some(GMT)) as date) > 16708)) AND isnotnull(hash#17))
: +- FileScan csv [hash#17,timestamp#32] Batched: false, DataFilters: [(cast(from_unixtime(cast(timestamp#32 as bigint), yyyy-MM-dd HH:mm:ss, Some(GMT)) as date) < 167..., Format: CSV, Location: InMemoryFileIndex[s3a://data-repository-bkt/ECS765/ethereum/blocks.csv], PartitionFilters: [], PushedFilters: [IsNotNull(hash)], ReadSchema: struct<hash:string,timestamp:int>
+- *(4) Sort [block_hash#72 ASC NULLS FIRST], false, 0
+- Exchange hashpartitioning(block_hash#72, 200), true, [id=#280]
+- *(3) Project [block_hash#72, gas#78, gas_price#79L]
+- *(3) 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>