cloud-fan commented on a change in pull request #26813: [SPARK-30188][SQL][WIP] 
Resolve the failed unit tests when enable AQE
URL: https://github.com/apache/spark/pull/26813#discussion_r364250472
 
 

 ##########
 File path: 
sql/core/src/test/scala/org/apache/spark/sql/util/DataFrameCallbackSuite.scala
 ##########
 @@ -89,38 +93,42 @@ class DataFrameCallbackSuite extends QueryTest with 
SharedSparkSession {
   }
 
   test("get numRows metrics by callback") {
-    val metrics = ArrayBuffer.empty[Long]
-    val listener = new QueryExecutionListener {
-      // Only test successful case here, so no need to implement `onFailure`
-      override def onFailure(funcName: String, qe: QueryExecution, error: 
Throwable): Unit = {}
-
-      override def onSuccess(funcName: String, qe: QueryExecution, duration: 
Long): Unit = {
-        val metric = qe.executedPlan match {
-          case w: WholeStageCodegenExec => w.child.longMetric("numOutputRows")
-          case other => other.longMetric("numOutputRows")
+    withSQLConf(SQLConf.ADAPTIVE_EXECUTION_ENABLED.key -> "true") {
 
 Review comment:
   I think we can revert the changes here. We've already fixed the bug of 
resetting metrics.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to