Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12618#discussion_r60846156
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveSessionCatalog.scala ---
    @@ -75,6 +77,33 @@ private[sql] class HiveSessionCatalog(
       // | Methods and fields for interacting with HiveMetastoreCatalog |
       // ----------------------------------------------------------------
     
    +  override def validateName(name: String): Boolean = {
    +    super.validateName(name)
    +    // Since we are saving metadata to metastore, we need to check if 
metastore supports
    +    // the table name and database name we have for this query. 
MetaStoreUtils.validateName
    +    // is the method used by Hive to check if a table name or a database 
name is valid for
    +    // the metastore.
    +    MetaStoreUtils.validateName(name)
    +  }
    +
    +  override def validateDatabaseName(dbName: Option[String]): Unit = {
    +    if (dbName.isDefined) validateDatabaseName(dbName.get)
    +  }
    +
    +  override def validateDatabaseName(dbName: String): Unit = {
    +    if (!validateName(dbName)) {
    +      throw new AnalysisException(s"Database name '$dbName' is not a valid 
name for metastore. " +
    --- End diff --
    
    Yeah, I can remove them. To external users, they do not care it. : )


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to