cloud-fan commented on a change in pull request #26775: [SPARK-30018][SQL]
Support ALTER DATABASE SET OWNER syntax
URL: https://github.com/apache/spark/pull/26775#discussion_r364604972
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/CreateNamespaceExec.scala
##########
@@ -35,11 +36,14 @@ case class CreateNamespaceExec(
extends V2CommandExec {
override protected def run(): Seq[InternalRow] = {
import org.apache.spark.sql.connector.catalog.CatalogV2Implicits._
+ import org.apache.spark.sql.connector.catalog.SupportsNamespaces._
val ns = namespace.toArray
if (!catalog.namespaceExists(ns)) {
try {
- catalog.createNamespace(ns, properties.asJava)
+ val ownership =
+ Map(PROP_OWNER_NAME -> Utils.getCurrentUserName(), PROP_OWNER_TYPE
-> "USER")
Review comment:
ah i see, then let's do it too.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]