You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Nirav Patel <np...@xactlycorp.com> on 2020/03/05 00:05:55 UTC
Spark DataSet class is not truly private[sql]
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>