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

    https://github.com/apache/spark/pull/12618#discussion_r60842895
  
    --- 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 --
    
    The only difference is the term 'Metastore' right? I am not use if this 
warrants an override.


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