peter-toth commented on code in PR #43671:
URL: https://github.com/apache/spark/pull/43671#discussion_r1383476886
##########
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
+ // Find the beginning of Spark code traces
+ while (i < st.length && !sparkCode(st(i))) i += 1
+ // Stop at the end of the first Spark code traces
while (i < st.length && sparkCode(st(i))) i += 1
val origin =
Origin(stackTrace = Some(Thread.currentThread().getStackTrace.slice(i
- 1, i + 1)))
Review Comment:
why we don't use `st` here?
--
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]