Skip to content

Commit

Permalink
Revert the change about queryExecution.assertAnalyzed.
Browse files Browse the repository at this point in the history
  • Loading branch information
dongjoon-hyun committed Jul 5, 2016
1 parent 1402a9d commit 45eb28a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private[sql] object Dataset {
def ofRows(sparkSession: SparkSession, logicalPlan: LogicalPlan): DataFrame = {
val qe = sparkSession.sessionState.executePlan(logicalPlan)
qe.assertAnalyzed()
new Dataset[Row](sparkSession, qe, RowEncoder(qe.analyzed.schema), skipAnalysis = true)
new Dataset[Row](sparkSession, qe, RowEncoder(qe.analyzed.schema))
}
}

Expand Down Expand Up @@ -155,11 +155,10 @@ private[sql] object Dataset {
class Dataset[T] private[sql](
@transient val sparkSession: SparkSession,
@DeveloperApi @transient val queryExecution: QueryExecution,
encoder: Encoder[T],
skipAnalysis: Boolean = false)
encoder: Encoder[T])
extends Serializable {

if (!skipAnalysis) queryExecution.assertAnalyzed()
queryExecution.assertAnalyzed()

// Note for Spark contributors: if adding or updating any action in `Dataset`, please make sure
// you wrap it with `withNewExecutionId` if this actions doesn't call other action.
Expand Down

0 comments on commit 45eb28a

Please sign in to comment.