ottomata commented on issue #21012: [SPARK-23890][SQL] Support CHANGE COLUMN to add nested fields to structs URL: https://github.com/apache/spark/pull/21012#issuecomment-526188890 @cloud-fan oh cool! Can you tell me how to do this then? I just tried with Spark 2.4.3: ```sql CREATE TABLE otto.p1 ( name string, val int, s struct<v1:string> ) STORED AS PARQUET; ``` ```scala scala> spark.sql("alter table otto.p1 change column s s struct<v1:string,v2:string>") org.apache.spark.sql.AnalysisException: ALTER TABLE CHANGE COLUMN is not supported for changing column 's' with type 'StructType(StructField(v1,StringType,true))' to 's' with type 'StructType(StructField(v1,StringType,true), StructField(v2,StringType,true))'; at org.apache.spark.sql.execution.command.AlterTableChangeColumnCommand.run(ddl.scala:323) ... ```
---------------------------------------------------------------- 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] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
