Github user sarutak commented on a diff in the pull request:
https://github.com/apache/spark/pull/11301#discussion_r55948509
--- 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 think it should be replaced with the real call site but if it's
difficult, how about just reset the origin and memorize TODO for the future
work.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]