Skip to content

Commit d35fac3

Browse files
committed
address comments
1 parent c0dcd24 commit d35fac3

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

sql/core/src/main/scala/org/apache/spark/sql/DataFrameWriter.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,10 @@ final class DataFrameWriter[T] private[sql](ds: Dataset[T]) {
575575
format("csv").save(path)
576576
}
577577

578+
/**
579+
* Wrap a DataFrameWriter action to track the QueryExecution and time cost, then report to the
580+
* user-registered callback functions.
581+
*/
578582
private def runCommand(session: SparkSession, name: String)(command: LogicalPlan): Unit = {
579583
val qe = session.sessionState.executePlan(command)
580584
try {

sql/core/src/test/scala/org/apache/spark/sql/util/DataFrameCallbackSuite.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ class DataFrameCallbackSuite extends QueryTest with SharedSQLContext {
166166
val commands = ArrayBuffer.empty[(String, LogicalPlan)]
167167
val exceptions = ArrayBuffer.empty[(String, Exception)]
168168
val listener = new QueryExecutionListener {
169-
// Only test successful case here, so no need to implement `onFailure`
170169
override def onFailure(funcName: String, qe: QueryExecution, exception: Exception): Unit = {
171170
exceptions += funcName -> exception
172171
}

0 commit comments

Comments
 (0)