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

    https://github.com/apache/spark/pull/16626#discussion_r99681098
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala ---
    @@ -814,4 +816,50 @@ object DDLUtils {
           }
         }
       }
    +
    +  /**
    +   * ALTER TABLE ADD COLUMNS command does not support temporary view/table,
    +   * view, or datasource table with text, orc formats or external provider.
    +   */
    +  def verifyAlterTableAddColumn(
    +      catalog: SessionCatalog,
    +      table: TableIdentifier): CatalogTable = {
    +    if (catalog.isTemporaryTable(table)) {
    +      throw new AnalysisException(
    +        s"${table.toString} is a temporary VIEW, which does not support 
ALTER ADD COLUMNS.")
    +    }
    +
    +    val catalogTable = catalog.getTableMetadata(table)
    --- End diff --
    
    I see. Will do. Thanks!


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to