cloud-fan commented on code in PR #49445: URL: https://github.com/apache/spark/pull/49445#discussion_r1946874343
########## sql/core/src/main/scala/org/apache/spark/sql/execution/command/v2/SetVariableExec.scala: ########## @@ -47,21 +50,45 @@ case class SetVariableExec(variables: Seq[VariableReference], query: SparkPlan) val row = values(0) variables.zipWithIndex.foreach { case (v, index) => val value = row.get(index, v.dataType) - createVariable(variableManager, v, value) + setVariable(v, value) } } Seq.empty } - private def createVariable( - variableManager: TempVariableManager, + private def setVariable( variable: VariableReference, value: Any): Unit = { - variableManager.create( - variable.identifier.name, + val namePartsCaseAdjusted = if (session.sessionState.conf.caseSensitiveAnalysis) { + variable.originalNameParts + } else { + variable.originalNameParts.map(_.toLowerCase(Locale.ROOT)) Review Comment: to confirm: we do the same thing in CREATE VARIABLE? -- 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