I see Spark dataset is defined as: class Dataset[T] private[sql](
@transient val sparkSession: SparkSession, @DeveloperApi @InterfaceStability.Unstable @transient val queryExecution: QueryExecution, encoder: Encoder[T]) However it has public constructors which allows DataSet to be extended which I don't think is intended by Developer. def this(sparkSession: SparkSession, logicalPlan: LogicalPlan, encoder: Encoder[T]) = { this(sparkSession, sparkSession.sessionState.executePlan(logicalPlan), encoder) } def this(sqlContext: SQLContext, logicalPlan: LogicalPlan, encoder: Encoder[T]) = { this(sqlContext.sparkSession, logicalPlan, encoder) } -- <http://www.xactlycorp.com> <https://www.xactlycorp.com/resources/guides/the-2020-gartner-magic-quadrant-for-sales-performance-management-spm?utm_source=signature&utm_medium=email&utm_campaign=guide_2020-gartner-magic-quadrant>