Project [CASE WHEN ((fractile#94389049 = NA) OR (fractile#94389049 = null)) THEN null ELSE cast(fractile#94389049 as int) END AS fractile#94389097, CASE WHEN (cap#94389050 = null) THEN null ELSE cap#94389050 END AS cap#94389098, CASE WHEN ((size#94389051 = NA) OR (size#94389051 = null)) THEN null ELSE cast(size#94389051 as float) END AS size#94389099, CASE WHEN ((value#94389052 = NA) OR (value#94389052 = null)) THEN null ELSE cast(value#94389052 as float) END AS value#94389100, CASE WHEN ((growth#94389053 = NA) OR (growth#94389053 = null)) THEN null ELSE cast(growth#94389053 as float) END AS growth#94389101, CASE WHEN ((leverage#94389054 = NA) OR (leverage#94389054 = null)) THEN null ELSE cast(leverage#94389054 as float) END AS leverage#94389102, CASE WHEN ((volatility#94389055 = NA) OR (volatility#94389055 = null)) THEN null ELSE cast(volatility#94389055 as float) END AS volatility#94389103, CASE WHEN ((momentum#94389056 = NA) OR (momentum#94389056 = null)) THEN null ELSE cast(momentum#94389056 as float) END AS momentum#94389104, CASE WHEN ((yield#94389057 = NA) OR (yield#94389057 = null)) THEN null ELSE cast(yield#94389057 as float) END AS yield#94389105, CASE WHEN ((##94389058 = NA) OR (##94389058 = null)) THEN null ELSE cast(##94389058 as float) END AS ##94389106, CASE WHEN (min_date#94389059 = null) THEN null ELSE cast(min_date#94389059 as date) END AS min_date#94389107, CASE WHEN (max_date#94389060 = null) THEN null ELSE cast(max_date#94389060 as date) END AS max_date#94389108]
Project [CASE WHEN ((cap#94160377 = NA) OR (cap#94160377 = null)) THEN null ELSE cast(cap#94160377 as int) END AS cap#94160394, CASE WHEN (sort#94160378 = null) THEN null ELSE sort#94160378 END AS sort#94160395, CASE WHEN (description#94160379 = null) THEN null ELSE description#94160379 END AS description#94160396, CASE WHEN ((universe#94160380 = NA) OR (universe#94160380 = null)) THEN null ELSE cast(universe#94160380 as int) END AS universe#94160397]
== Physical Plan ==
CollectLimit (20)
+- InMemoryTableScan (1)
+- InMemoryRelation (2)
+- * Sort (19)
+- Exchange (18)
+- * Project (17)
+- * BroadcastHashJoin Inner BuildRight (16)
:- * Project (8)
: +- * Filter (7)
: +- InMemoryTableScan (3)
: +- InMemoryRelation (4)
: +- * Project (6)
: +- Scan csv (5)
+- BroadcastExchange (15)
+- * Project (14)
+- * Filter (13)
+- InMemoryTableScan (9)
+- InMemoryRelation (10)
+- * Project (12)
+- Scan csv (11)
(1) InMemoryTableScan
Output [11]: [fractile#94389097, size#94389099, value#94389100, growth#94389101, leverage#94389102, volatility#94389103, momentum#94389104, yield#94389105, ##94389106, min_date#94389107, max_date#94389108]
Arguments: [fractile#94389097, size#94389099, value#94389100, growth#94389101, leverage#94389102, volatility#94389103, momentum#94389104, yield#94389105, ##94389106, min_date#94389107, max_date#94389108]
(2) InMemoryRelation
Arguments: [fractile#94389097, size#94389099, value#94389100, growth#94389101, leverage#94389102, volatility#94389103, momentum#94389104, yield#94389105, ##94389106, min_date#94389107, max_date#94389108], CachedRDDBuilder(org.apache.spark.sql.execution.columnar.DefaultCachedBatchSerializer@208e3fd9,StorageLevel(disk, memory, deserialized, 1 replicas),*(3) Sort [fractile#94389097 ASC NULLS FIRST], true, 0
+- Exchange rangepartitioning(fractile#94389097 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [id=#7536190]
+- *(2) Project [fractile#94389097, size#94389099, value#94389100, growth#94389101, leverage#94389102, volatility#94389103, momentum#94389104, yield#94389105, ##94389106, min_date#94389107, max_date#94389108]
+- *(2) BroadcastHashJoin [cap_description#94389121], [description#94160396], Inner, BuildRight, false
:- *(2) Project [fractile#94389097, cap#94389098 AS cap_description#94389121, size#94389099, value#94389100, growth#94389101, leverage#94389102, volatility#94389103, momentum#94389104, yield#94389105, ##94389106, min_date#94389107, max_date#94389108]
: +- *(2) Filter ((isnotnull(fractile#94389097) AND NOT (fractile#94389097 = -1)) AND isnotnull(cap#94389098))
: +- InMemoryTableScan [##94389106, cap#94389098, fractile#94389097, growth#94389101, leverage#94389102, max_date#94389108, min_date#94389107, momentum#94389104, size#94389099, value#94389100, volatility#94389103, yield#94389105], [isnotnull(fractile#94389097), NOT (fractile#94389097 = -1), isnotnull(cap#94389098)]
: +- InMemoryRelation [fractile#94389097, cap#94389098, size#94389099, value#94389100, growth#94389101, leverage#94389102, volatility#94389103, momentum#94389104, yield#94389105, ##94389106, min_date#94389107, max_date#94389108], StorageLevel(disk, memory, deserialized, 1 replicas)
: +- *(1) Project [CASE WHEN ((fractile#94389049 = NA) OR (fractile#94389049 = null)) THEN null ELSE cast(fractile#94389049 as int) END AS fractile#94389097, CASE WHEN (cap#94389050 = null) THEN null ELSE cap#94389050 END AS cap#94389098, CASE WHEN ((size#94389051 = NA) OR (size#94389051 = null)) THEN null ELSE cast(size#94389051 as float) END AS size#94389099, CASE WHEN ((value#94389052 = NA) OR (value#94389052 = null)) THEN null ELSE cast(value#94389052 as float) END AS value#94389100, CASE WHEN ((growth#94389053 = NA) OR (growth#94389053 = null)) THEN null ELSE cast(growth#94389053 as float) END AS growth#94389101, CASE WHEN ((leverage#94389054 = NA) OR (leverage#94389054 = null)) THEN null ELSE cast(leverage#94389054 as float) END AS leverage#94389102, CASE WHEN ((volatility#94389055 = NA) OR (volatility#94389055 = null)) THEN null ELSE cast(volatility#94389055 as float) END AS volatility#94389103, CASE WHEN ((momentum#94389056 = NA) OR (momentum#94389056 = null)) THEN null ELSE cast(momentum#94389056 as float) END AS momentum#94389104, CASE WHEN ((yield#94389057 = NA) OR (yield#94389057 = null)) THEN null ELSE cast(yield#94389057 as float) END AS yield#94389105, CASE WHEN ((##94389058 = NA) OR (##94389058 = null)) THEN null ELSE cast(##94389058 as float) END AS ##94389106, CASE WHEN (min_date#94389059 = null) THEN null ELSE cast(min_date#94389059 as date) END AS min_date#94389107, CASE WHEN (max_date#94389060 = null) THEN null ELSE cast(max_date#94389060 as date) END AS max_date#94389108]
: +- FileScan csv [fractile#94389049,cap#94389050,size#94389051,value#94389052,growth#94389053,leverage#94389054,volatility#94389055,momentum#94389056,yield#94389057,##94389058,min_date#94389059,max_date#94389060] Batched: false, DataFilters: [], Format: CSV, Location: InMemoryFileIndex(1 paths)[file:/srv/plusamp/data/default/ea-market/output/risk_factors/leverage/..., PartitionFilters: [], PushedFilters: [], ReadSchema: struct<fractile:string,cap:string,size:string,value:string,growth:string,leverage:string,volatili...
+- BroadcastExchange HashedRelationBroadcastMode(List(input[0, string, true]),false), [id=#7536185]
+- *(1) Project [description#94160396]
+- *(1) Filter ((isnotnull(cap#94160394) AND (cap#94160394 = 0)) AND isnotnull(description#94160396))
+- InMemoryTableScan [cap#94160394, description#94160396], [isnotnull(cap#94160394), (cap#94160394 = 0), isnotnull(description#94160396)]
+- InMemoryRelation [cap#94160394, sort#94160395, description#94160396, universe#94160397], StorageLevel(disk, memory, deserialized, 1 replicas)
+- *(1) Project [CASE WHEN ((cap#94160377 = NA) OR (cap#94160377 = null)) THEN null ELSE cast(cap#94160377 as int) END AS cap#94160394, CASE WHEN (sort#94160378 = null) THEN null ELSE sort#94160378 END AS sort#94160395, CASE WHEN (description#94160379 = null) THEN null ELSE description#94160379 END AS description#94160396, CASE WHEN ((universe#94160380 = NA) OR (universe#94160380 = null)) THEN null ELSE cast(universe#94160380 as int) END AS universe#94160397]
+- FileScan csv [cap#94160377,sort#94160378,description#94160379,universe#94160380] Batched: false, DataFilters: [], Format: CSV, Location: InMemoryFileIndex(1 paths)[file:/srv/plusamp/data/default/ea-market/curate/curate_cap.csv], PartitionFilters: [], PushedFilters: [], ReadSchema: struct<cap:string,sort:string,description:string,universe:string>
,None), [fractile#94389097 ASC NULLS FIRST]
(3) InMemoryTableScan
Output [12]: [##94389106, cap#94389098, fractile#94389097, growth#94389101, leverage#94389102, max_date#94389108, min_date#94389107, momentum#94389104, size#94389099, value#94389100, volatility#94389103, yield#94389105]
Arguments: [##94389106, cap#94389098, fractile#94389097, growth#94389101, leverage#94389102, max_date#94389108, min_date#94389107, momentum#94389104, size#94389099, value#94389100, volatility#94389103, yield#94389105], [isnotnull(fractile#94389097), NOT (fractile#94389097 = -1), isnotnull(cap#94389098)]
(4) InMemoryRelation
Arguments: [fractile#94389097, cap#94389098, size#94389099, value#94389100, growth#94389101, leverage#94389102, volatility#94389103, momentum#94389104, yield#94389105, ##94389106, min_date#94389107, max_date#94389108], CachedRDDBuilder(org.apache.spark.sql.execution.columnar.DefaultCachedBatchSerializer@208e3fd9,StorageLevel(disk, memory, deserialized, 1 replicas),*(1) Project [CASE WHEN ((fractile#94389049 = NA) OR (fractile#94389049 = null)) THEN null ELSE cast(fractile#94389049 as int) END AS fractile#94389097, CASE WHEN (cap#94389050 = null) THEN null ELSE cap#94389050 END AS cap#94389098, CASE WHEN ((size#94389051 = NA) OR (size#94389051 = null)) THEN null ELSE cast(size#94389051 as float) END AS size#94389099, CASE WHEN ((value#94389052 = NA) OR (value#94389052 = null)) THEN null ELSE cast(value#94389052 as float) END AS value#94389100, CASE WHEN ((growth#94389053 = NA) OR (growth#94389053 = null)) THEN null ELSE cast(growth#94389053 as float) END AS growth#94389101, CASE WHEN ((leverage#94389054 = NA) OR (leverage#94389054 = null)) THEN null ELSE cast(leverage#94389054 as float) END AS leverage#94389102, CASE WHEN ((volatility#94389055 = NA) OR (volatility#94389055 = null)) THEN null ELSE cast(volatility#94389055 as float) END AS volatility#94389103, CASE WHEN ((momentum#94389056 = NA) OR (momentum#94389056 = null)) THEN null ELSE cast(momentum#94389056 as float) END AS momentum#94389104, CASE WHEN ((yield#94389057 = NA) OR (yield#94389057 = null)) THEN null ELSE cast(yield#94389057 as float) END AS yield#94389105, CASE WHEN ((##94389058 = NA) OR (##94389058 = null)) THEN null ELSE cast(##94389058 as float) END AS ##94389106, CASE WHEN (min_date#94389059 = null) THEN null ELSE cast(min_date#94389059 as date) END AS min_date#94389107, CASE WHEN (max_date#94389060 = null) THEN null ELSE cast(max_date#94389060 as date) END AS max_date#94389108]
+- FileScan csv [fractile#94389049,cap#94389050,size#94389051,value#94389052,growth#94389053,leverage#94389054,volatility#94389055,momentum#94389056,yield#94389057,##94389058,min_date#94389059,max_date#94389060] Batched: false, DataFilters: [], Format: CSV, Location: InMemoryFileIndex(1 paths)[file:/srv/plusamp/data/default/ea-market/output/risk_factors/leverage/..., PartitionFilters: [], PushedFilters: [], ReadSchema: struct<fractile:string,cap:string,size:string,value:string,growth:string,leverage:string,volatili...
,None)
(5) Scan csv
Output [12]: [fractile#94389049, cap#94389050, size#94389051, value#94389052, growth#94389053, leverage#94389054, volatility#94389055, momentum#94389056, yield#94389057, ##94389058, min_date#94389059, max_date#94389060]
Batched: false
Location: InMemoryFileIndex [file:/srv/plusamp/data/default/ea-market/output/risk_factors/leverage/REPORT_exposures.csv]
ReadSchema: struct<fractile:string,cap:string,size:string,value:string,growth:string,leverage:string,volatility:string,momentum:string,yield:string,#:string,min_date:string,max_date:string>
(6) Project [codegen id : 1]
Output [12]: [CASE WHEN ((fractile#94389049 = NA) OR (fractile#94389049 = null)) THEN null ELSE cast(fractile#94389049 as int) END AS fractile#94389097, CASE WHEN (cap#94389050 = null) THEN null ELSE cap#94389050 END AS cap#94389098, CASE WHEN ((size#94389051 = NA) OR (size#94389051 = null)) THEN null ELSE cast(size#94389051 as float) END AS size#94389099, CASE WHEN ((value#94389052 = NA) OR (value#94389052 = null)) THEN null ELSE cast(value#94389052 as float) END AS value#94389100, CASE WHEN ((growth#94389053 = NA) OR (growth#94389053 = null)) THEN null ELSE cast(growth#94389053 as float) END AS growth#94389101, CASE WHEN ((leverage#94389054 = NA) OR (leverage#94389054 = null)) THEN null ELSE cast(leverage#94389054 as float) END AS leverage#94389102, CASE WHEN ((volatility#94389055 = NA) OR (volatility#94389055 = null)) THEN null ELSE cast(volatility#94389055 as float) END AS volatility#94389103, CASE WHEN ((momentum#94389056 = NA) OR (momentum#94389056 = null)) THEN null ELSE cast(momentum#94389056 as float) END AS momentum#94389104, CASE WHEN ((yield#94389057 = NA) OR (yield#94389057 = null)) THEN null ELSE cast(yield#94389057 as float) END AS yield#94389105, CASE WHEN ((##94389058 = NA) OR (##94389058 = null)) THEN null ELSE cast(##94389058 as float) END AS ##94389106, CASE WHEN (min_date#94389059 = null) THEN null ELSE cast(min_date#94389059 as date) END AS min_date#94389107, CASE WHEN (max_date#94389060 = null) THEN null ELSE cast(max_date#94389060 as date) END AS max_date#94389108]
Input [12]: [fractile#94389049, cap#94389050, size#94389051, value#94389052, growth#94389053, leverage#94389054, volatility#94389055, momentum#94389056, yield#94389057, ##94389058, min_date#94389059, max_date#94389060]
(7) Filter [codegen id : 2]
Input [12]: [##94389106, cap#94389098, fractile#94389097, growth#94389101, leverage#94389102, max_date#94389108, min_date#94389107, momentum#94389104, size#94389099, value#94389100, volatility#94389103, yield#94389105]
Condition : ((isnotnull(fractile#94389097) AND NOT (fractile#94389097 = -1)) AND isnotnull(cap#94389098))
(8) Project [codegen id : 2]
Output [12]: [fractile#94389097, cap#94389098 AS cap_description#94389121, size#94389099, value#94389100, growth#94389101, leverage#94389102, volatility#94389103, momentum#94389104, yield#94389105, ##94389106, min_date#94389107, max_date#94389108]
Input [12]: [##94389106, cap#94389098, fractile#94389097, growth#94389101, leverage#94389102, max_date#94389108, min_date#94389107, momentum#94389104, size#94389099, value#94389100, volatility#94389103, yield#94389105]
(9) InMemoryTableScan
Output [2]: [cap#94160394, description#94160396]
Arguments: [cap#94160394, description#94160396], [isnotnull(cap#94160394), (cap#94160394 = 0), isnotnull(description#94160396)]
(10) InMemoryRelation
Arguments: [cap#94160394, sort#94160395, description#94160396, universe#94160397], CachedRDDBuilder(org.apache.spark.sql.execution.columnar.DefaultCachedBatchSerializer@208e3fd9,StorageLevel(disk, memory, deserialized, 1 replicas),*(1) Project [CASE WHEN ((cap#94160377 = NA) OR (cap#94160377 = null)) THEN null ELSE cast(cap#94160377 as int) END AS cap#94160394, CASE WHEN (sort#94160378 = null) THEN null ELSE sort#94160378 END AS sort#94160395, CASE WHEN (description#94160379 = null) THEN null ELSE description#94160379 END AS description#94160396, CASE WHEN ((universe#94160380 = NA) OR (universe#94160380 = null)) THEN null ELSE cast(universe#94160380 as int) END AS universe#94160397]
+- FileScan csv [cap#94160377,sort#94160378,description#94160379,universe#94160380] Batched: false, DataFilters: [], Format: CSV, Location: InMemoryFileIndex(1 paths)[file:/srv/plusamp/data/default/ea-market/curate/curate_cap.csv], PartitionFilters: [], PushedFilters: [], ReadSchema: struct<cap:string,sort:string,description:string,universe:string>
,None)
(11) Scan csv
Output [4]: [cap#94160377, sort#94160378, description#94160379, universe#94160380]
Batched: false
Location: InMemoryFileIndex [file:/srv/plusamp/data/default/ea-market/curate/curate_cap.csv]
ReadSchema: struct<cap:string,sort:string,description:string,universe:string>
(12) Project [codegen id : 1]
Output [4]: [CASE WHEN ((cap#94160377 = NA) OR (cap#94160377 = null)) THEN null ELSE cast(cap#94160377 as int) END AS cap#94160394, CASE WHEN (sort#94160378 = null) THEN null ELSE sort#94160378 END AS sort#94160395, CASE WHEN (description#94160379 = null) THEN null ELSE description#94160379 END AS description#94160396, CASE WHEN ((universe#94160380 = NA) OR (universe#94160380 = null)) THEN null ELSE cast(universe#94160380 as int) END AS universe#94160397]
Input [4]: [cap#94160377, sort#94160378, description#94160379, universe#94160380]
(13) Filter [codegen id : 1]
Input [2]: [cap#94160394, description#94160396]
Condition : ((isnotnull(cap#94160394) AND (cap#94160394 = 0)) AND isnotnull(description#94160396))
(14) Project [codegen id : 1]
Output [1]: [description#94160396]
Input [2]: [cap#94160394, description#94160396]
(15) BroadcastExchange
Input [1]: [description#94160396]
Arguments: HashedRelationBroadcastMode(List(input[0, string, true]),false), [id=#7536185]
(16) BroadcastHashJoin [codegen id : 2]
Left keys [1]: [cap_description#94389121]
Right keys [1]: [description#94160396]
Join condition: None
(17) Project [codegen id : 2]
Output [11]: [fractile#94389097, size#94389099, value#94389100, growth#94389101, leverage#94389102, volatility#94389103, momentum#94389104, yield#94389105, ##94389106, min_date#94389107, max_date#94389108]
Input [13]: [fractile#94389097, cap_description#94389121, size#94389099, value#94389100, growth#94389101, leverage#94389102, volatility#94389103, momentum#94389104, yield#94389105, ##94389106, min_date#94389107, max_date#94389108, description#94160396]
(18) Exchange
Input [11]: [fractile#94389097, size#94389099, value#94389100, growth#94389101, leverage#94389102, volatility#94389103, momentum#94389104, yield#94389105, ##94389106, min_date#94389107, max_date#94389108]
Arguments: rangepartitioning(fractile#94389097 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [id=#7536190]
(19) Sort [codegen id : 3]
Input [11]: [fractile#94389097, size#94389099, value#94389100, growth#94389101, leverage#94389102, volatility#94389103, momentum#94389104, yield#94389105, ##94389106, min_date#94389107, max_date#94389108]
Arguments: [fractile#94389097 ASC NULLS FIRST], true, 0
(20) CollectLimit
Input [11]: [fractile#94389097, size#94389099, value#94389100, growth#94389101, leverage#94389102, volatility#94389103, momentum#94389104, yield#94389105, ##94389106, min_date#94389107, max_date#94389108]
Arguments: 1000000