tprelle commented on pull request #31639:
URL: https://github.com/apache/spark/pull/31639#issuecomment-785499075
> > Change the table struct reodoring the struct
> > ALTER TABLE test_struct CHANGE COLUMN sub sub STRUCT < b:STRING,a :INT>;
>
> Really? It seems the operation cannot be allowd;
>
> ```
> scala> sql("""ALTER TABLE test_struct CHANGE COLUMN sub sub STRUCT <
b:STRING,a :INT>;""")
> org.apache.spark.sql.AnalysisException: ALTER TABLE CHANGE COLUMN is not
supported for changing column 'sub' with type
'StructType(StructField(a,IntegerType,true), StructField(b,StringType,true))'
to 'sub' with type 'StructType(StructField(b,StringType,true),
StructField(a,IntegerType,true))'
> ```
>
>
https://github.com/apache/spark/blob/b17754a8cbd2593eb2b1952e95a7eeb0f8e09cdb/sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala#L351-L357
Yes it's not allow by spark, but it's allow by Hive Tez or MR. And when you
have a commun environnement where Tez and spark access to the same metastore
and the same data it's can append (it's append to us hopefully we add a cast
exception and not the silent fail)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]