Does anyone know a good way in Scala to explode a row into multiple rows based on a range from two columns?
For example, for the input dataframe:
start_ip_int | end_ip_int | country | city
100 | 105 | USA | Boston
The expected output dataframe is:
start_ip_int | end_ip_int | country | city | ip
100 | 105 | USA | Boston | 100
100 | 105 | USA | Boston | 101
100 | 105 | USA | Boston | 102
100 | 105 | USA | Boston | 103
100 | 105 | USA | Boston | 104
100 | 105 | USA | Boston | 105
So here one row got split into 6 rows based on the range of columns start_ip_int and end_ip_int.