Github user kiszk commented on a diff in the pull request: https://github.com/apache/spark/pull/11301#discussion_r55937825 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/trees/TreeNode.scala --- @@ -57,15 +58,15 @@ object CurrentOrigin { def reset(): Unit = value.set(Origin()) - def setPosition(line: Int, start: Int): Unit = { + def setPosition(callSite: String, line: Int, start: Int): Unit = { value.set( - value.get.copy(line = Some(line), startPosition = Some(start))) + value.get.copy(callSite = Some(callSite), line = Some(line), startPosition = Some(start))) } def withOrigin[A](o: Origin)(f: => A): A = { + val current = get set(o) - val ret = try f finally { reset() } - reset() + val ret = try f finally { set(current) } --- End diff -- I ideally agree with you. As you can imagine, this is why an argument ```$"_1" * 10``` has been evaluated before the real call site ```select``` is called. Thus, ```$times``` for ```*``` is recorded instead of ```select```. Do we try to replace content of ```origin``` in ```Column``` with the call site for a real call site (e.g. ```select```) when this is called?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org