itholic commented on code in PR #46063:
URL: https://github.com/apache/spark/pull/46063#discussion_r1565870995


##########
sql/api/src/main/scala/org/apache/spark/sql/catalyst/trees/origin.scala:
##########
@@ -76,6 +76,12 @@ object CurrentOrigin {
       value.get.copy(line = Some(line), startPosition = Some(start)))
   }
 
+  def setPySparkErrorContext(pysparkFragment: String, pysparkCallSite: 
String): Unit = {
+    val tupleInfo = (pysparkFragment, pysparkCallSite)
+    value.set(
+      value.get.copy(pysparkErrorContext = Some(tupleInfo)))

Review Comment:
   I belive we still keeping JVM stacktrace since we're using `copy` here. That 
means the other parameters are still there, but just updating the 
`pysparkErrorContext` for the existing `CurrentOrigin`.



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

To unsubscribe, e-mail: [email protected]

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