davidm-db commented on code in PR #49445:
URL: https://github.com/apache/spark/pull/49445#discussion_r1913393500
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/VariableManager.scala:
##########
@@ -23,8 +23,39 @@ import scala.collection.mutable
import org.apache.spark.sql.AnalysisException
import org.apache.spark.sql.catalyst.expressions.Literal
+import org.apache.spark.sql.connector.catalog.{CatalogManager, Identifier}
import
org.apache.spark.sql.connector.catalog.CatalogManager.{SESSION_NAMESPACE,
SYSTEM_CATALOG_NAME}
import org.apache.spark.sql.errors.DataTypeErrorsBase
+import
org.apache.spark.sql.errors.QueryCompilationErrors.unresolvedVariableError
+
+trait VariableManager {
+ def create(
+ identifier: Identifier,
+ defaultValueSQL: String,
+ initValue: Literal,
+ overrideIfExists: Boolean): Unit
+
+ def set(
+ nameParts: Seq[String],
+ defaultValueSQL: String,
+ initValue: Literal,
+ identifier: Identifier): Unit
+
+ def get(nameParts: Seq[String]): Option[VariableDefinition]
+
+ def remove(name: String): Boolean
Review Comment:
nit: should we do `nameParts` here as well, to be consistent with other
interface functions? I get it that we don't use this for scripting, but it
looks a bit off like this.
--
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]