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


##########
sql/core/src/main/scala/org/apache/spark/sql/package.scala:
##########
@@ -111,6 +111,26 @@ package object sql {
     }
   }
 
+  private[sql] def withOrigin[T](
+      pysparkLoggingInfo: Option[java.util.Map[String, String]] = None)(f: => 
T): T = {
+    if (CurrentOrigin.get.stackTrace.isDefined) {
+      f
+    } else {
+      val st = Thread.currentThread().getStackTrace

Review Comment:
   > Can we add a method to avoid duplicated code of capturing java stacktraces?
   
   Sure, will address it



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to