madeirak commented on issue #11872: URL: https://github.com/apache/iceberg/issues/11872#issuecomment-2572194150
> @madeirak this seems to be working on iceberg runtime 1.5.0 and spark 3.5.1. > > Here is what I did: > > ``` > # Setup demo infra > ## use docker-compose.yaml from https://iceberg.apache.org/spark-quickstart/#docker-compose > > # Start a Spark sql session > docker exec -it spark-iceberg spark-sql > > # Create table with above schema > spark-sql ()> CREATE TABLE demo.nyc.table1 > > ( > > name1 STRING, > > sb_col STRUCT<id: STRING, ss_col: ARRAY<MAP<STRING, STRUCT<c: INT, d: STRING>>>> > > ); > Time taken: 2.116 seconds > > # Display the table schema > spark-sql ()> show create table demo.nyc.table1; > CREATE TABLE demo.nyc.table1 ( > name1 STRING, > sb_col STRUCT<id: STRING, ss_col: ARRAY<MAP<STRING, STRUCT<c: INT, d: STRING>>>>) > USING iceberg > LOCATION 's3://warehouse/nyc/table1' > TBLPROPERTIES ( > 'current-snapshot-id' = 'none', > 'format' = 'iceberg/parquet', > 'format-version' = '2', > 'write.parquet.compression-codec' = 'zstd') > Time taken: 0.166 seconds, Fetched 1 row(s) > > # Column rename > spark-sql ()> alter table demo.nyc.table1 RENAME COLUMN sb_col.ss_col.element.value.d to d_1; > Time taken: 0.169 seconds > > # Display the updated table schema > spark-sql ()> show create table demo.nyc.table1; > CREATE TABLE demo.nyc.table1 ( > name1 STRING, > sb_col STRUCT<id: STRING, ss_col: ARRAY<MAP<STRING, STRUCT<c: INT, d_1: STRING>>>>) > USING iceberg > LOCATION 's3://warehouse/nyc/table1' > TBLPROPERTIES ( > 'current-snapshot-id' = 'none', > 'format' = 'iceberg/parquet', > 'format-version' = '2', > 'write.parquet.compression-codec' = 'zstd') > Time taken: 0.045 seconds, Fetched 1 row(s) > ``` Thx for reply, It seems that this problem has been fixed in version Iceberg>=1.5 -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org