maropu commented on pull request #31639:
URL: https://github.com/apache/spark/pull/31639#issuecomment-785479023


   > 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


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

Reply via email to