You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "ottomata (via GitHub)" <gi...@apache.org> on 2024/01/01 17:55:53 UTC

Re: [PR] [SPARK-23890][SQL] Support CHANGE COLUMN to add nested fields to structs [spark]

ottomata commented on PR #21012:
URL: https://github.com/apache/spark/pull/21012#issuecomment-1873419167

   Starting to try this.  I think there is more to change than just the list of datasources for which `verifyAlterTableAddColumn` will throw `alterAddColNotSupportDatasourceTableError`.
   
   In this [commit](https://github.com/apache/spark/compare/master...ottomata:spark:SPARK-23890-add-nested-column), I've done so, but now a check is failing in ResolveCatalogSession.  It looks like even with `USING json` or `USING hive`, [this case match](https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSessionCatalog.scala#L55-L60) against `ResolvedV1TableIdentifier` is matching, causing 
   
   ```
   [UNSUPPORTED_FEATURE.TABLE_OPERATION] The feature is not supported: Table `spark_catalog`.`default`.`t1` does not support ADD COLUMN with qualified column. Please check the current catalog and namespace to make sure the qualified table name is expected, and also check the catalog implementation which is configured by "spark.sql.catalog". SQLSTATE: 0A000
   ```
   
   to be thrown.
   
   @cloud-fan, 
   Do we need to an another case in ResolveCatalogSession before this one to also allow these v2 datasources, even though they have v1 compatibility TableIdentifiers (?) to continue with the ALTER command?


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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