dusantism-db commented on code in PR #49445: URL: https://github.com/apache/spark/pull/49445#discussion_r1926719013
########## sql/core/src/main/scala/org/apache/spark/sql/scripting/SqlScriptingExecutionContext.scala: ########## @@ -89,4 +96,6 @@ class SqlScriptingExecutionFrame( * @param label * Label of the scope. */ -class SqlScriptingExecutionScope(val label: String) +class SqlScriptingExecutionScope(val label: String) { + val variables = new mutable.HashMap[String, VariableDefinition] Review Comment: `TempVariableManager` has logic specific to session variables (for example error throwing), and using a simple map gives us more control from `SqlScriptingVariableManager`. Also, when `TempVariableManager` changes in the future, that could have unintended consequences on local variables. Further, putting a `SqlScriptingVariableManager` here is not possible because we want `SqlScriptingVariableManager` to access multiple scopes/frames, not be tied to a single one. -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org