spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nirav Patel <npa...@xactlycorp.com>
Subject Spark DataSet class is not truly private[sql]
Date Thu, 05 Mar 2020 00:05:55 GMT
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>


Mime
View raw message