I understand that Case Class
are minimal regular classes and StructType
is a spark Datatype which is a collection of StructFields
.
But we can use both Case Class
and StructType
to create Dataframes and other use cases in a similar way.
Wanted to understand
- in what scenarios we should prefer One over the other and WHY ?
- Are there some scenarios where we have to use one of them, and not possible to use the other?