MaxGekk commented on code in PR #38650:
URL: https://github.com/apache/spark/pull/38650#discussion_r1024814862


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2Strategy.scala:
##########
@@ -369,7 +369,7 @@ class DataSourceV2Strategy(session: SparkSession) extends 
Strategy with Predicat
     case CreateNamespace(ResolvedNamespace(catalog, ns), ifNotExists, 
properties) =>
       val location = properties.get(SupportsNamespaces.PROP_LOCATION)
       if (location.isDefined && location.get.isEmpty) {
-        throw QueryExecutionErrors.unsupportedEmptyLocationError()
+        throw QueryExecutionErrors.invalidEmptyLocationError(location.toString)

Review Comment:
   Please, get the value from the `location` Option.



##########
sql/core/src/test/scala/org/apache/spark/sql/execution/command/CreateNamespaceSuiteBase.scala:
##########
@@ -74,8 +74,8 @@ trait CreateNamespaceSuiteBase extends QueryTest with 
DDLCommandTestUtils {
           exception = intercept[SparkIllegalArgumentException] {
             sql(sqlText)
           },
-          errorClass = "UNSUPPORTED_EMPTY_LOCATION",
-          parameters = Map.empty)
+          errorClass = "INVALID_EMPTY_LOCATION",
+          parameters = Map("location" -> "Some()"))

Review Comment:
   `Some()`? Could you get the value, please.



-- 
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]

Reply via email to