milastdbx commented on code in PR #44450:
URL: https://github.com/apache/spark/pull/44450#discussion_r1434860929
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/executeImmediate.scala:
##########
@@ -177,7 +177,7 @@ class SubstituteExecuteImmediate(val catalogManager:
CatalogManager)
private def getVariableReference(expr: Expression, nameParts: Seq[String]):
VariableReference = {
lookupVariable(nameParts) match {
- case Some(variable) => variable.copy(canFold = false)
+ case Some(variable) => variable.copy()
Review Comment:
lookupVariable creates new VariableReference object which encapsulates
VariableDefinition object which is stored in catalog.
I think its better to have it copied
--
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]