peter-toth commented on code in PR #43671:
URL: https://github.com/apache/spark/pull/43671#discussion_r1383362699


##########
sql/core/src/main/scala/org/apache/spark/sql/package.scala:
##########
@@ -98,7 +98,10 @@ package object sql {
       f
     } else {
       val st = Thread.currentThread().getStackTrace
-      var i = 3
+      var i = 0

Review Comment:
   I'm not sure why we need this first loop to find the beginning of Spark 
code. We can be sure that the first stacktrace element belongs to 
`getStackTrace()`, the second belongs to `withOrigin()`, and because 
`withOrigin()` can't be called from user code the 3rd must belong to Spark code.



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