sririshindra commented on a change in pull request #31477:
URL: https://github.com/apache/spark/pull/31477#discussion_r578113170



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/BroadcastNestedLoopJoinExec.scala
##########
@@ -89,13 +90,20 @@ case class BroadcastNestedLoopJoinExec(
     }
   }
 
-  @transient private lazy val boundCondition = {
+  private val numMatchedRows = longMetric("numMatchedRows")

Review comment:
       Actually making it lazy is causing a NullPointerException in 
SqlQuerySuite, ExistenceJoinSuite, OuterJoinSuite.  Somehow the sqlContext 
object in line 67 is turning out to be null. I am still trying to understand 
why that is the case. For now I reverted the change.
   `java.lang.NullPointerException
        at 
org.apache.spark.sql.execution.SparkPlan.sparkContext(SparkPlan.scala:67)
        at 
org.apache.spark.sql.execution.joins.BroadcastNestedLoopJoinExec.metrics$lzycompute(BroadcastNestedLoopJoinExec.scala:42)
        at 
org.apache.spark.sql.execution.joins.BroadcastNestedLoopJoinExec.metrics(BroadcastNestedLoopJoinExec.scala:41)
        at 
org.apache.spark.sql.execution.SparkPlan.longMetric(SparkPlan.scala:135)
        at 
org.apache.spark.sql.execution.joins.BroadcastNestedLoopJoinExec.numMatchedRows$lzycompute(BroadcastNestedLoopJoinExec.scala:93)




----------------------------------------------------------------
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]



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

Reply via email to