[
https://issues.apache.org/jira/browse/SPARK-52490?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David Milicevic updated SPARK-52490:
------------------------------------
Summary: [M2] Read origins from respective logical plans, since each one of
them has its own origin already set. (was: [M3] Read origins from respective
logical plans, since each one of them has its own origin already set.)
> [M2] Read origins from respective logical plans, since each one of them has
> its own origin already set.
> -------------------------------------------------------------------------------------------------------
>
> Key: SPARK-52490
> URL: https://issues.apache.org/jira/browse/SPARK-52490
> Project: Spark
> Issue Type: Sub-task
> Components: Spark Core
> Affects Versions: 4.0.0
> Reporter: Milan Dankovic
> Priority: Major
>
> During parsing, we use the `withOrigin` methods to scope the origin, and
> return it to the previous value after. In some cases we use
> `CurrentOrigin.get` after we're finished with parsing. Returned value would
> probably not be correct.
> Example in file
> [SqlScriptingInterpreter.scala|https://github.com/apache/spark/pull/51168/files/3bbab76b77be74fe92ad32a35d924415ca24c68f#diff-994e2e81702c07946a2a7a0204a3cde77e12711caa4fee24c490b8c1dce81e8f]:
>
> {code:java}
> ...
> if (sqlExceptionHandler.isDefined) {
> throw SqlScriptingErrors
> .duplicateHandlerForSameCondition(CurrentOrigin.get, "SQLEXCEPTION")
> } ...{code}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]