Describe the bug
SparkUtils.flattenSchema method throws NPE for the empty data frame having occurs or schema contains arrays
To Reproduce
create a data frame from empty data file and copybook with occurs and flatten the schema with SparkUtils.flattenSchema method
Expected behaviour
It should return the flatten the schema with zero records as it's empty dataset
Screenshots
Additional context