tomtongue commented on PR #16859:
URL: https://github.com/apache/iceberg/pull/16859#issuecomment-5352574076

   In addition to those tests, I also tested querying `metadata_log_entries` 
table from Spark on local. Here's the results and they worked fine.
   
   ```sql
   > CREATE TABLE db.t (id bigint, data string) USING iceberg
   > INSERT INTO db.t VALUES (1, 'a')
   
   > SELECT * FROM db.t.metadata_log_entries
   /*
   
+-----------------------+-------------------------------------------------------------------------------------+------------------+----------------+----------------------+---------------------------------------------------------+
   |timestamp              |file                                                
                                 
|latest_snapshot_id|latest_schema_id|latest_sequence_number|properties          
                                     |
   
+-----------------------+-------------------------------------------------------------------------------------+------------------+----------------+----------------------+---------------------------------------------------------+
   |2026-08-20 
06:47:00.286|s3://warehouse/db/t/metadata/00000-4c91df99-f3eb-489c-950e-55415224b460.metadata.json|NULL
              |NULL            |NULL                  |{owner -> spark, 
write.parquet.compression-codec -> zstd}|
   |2026-08-20 
06:47:40.675|s3://warehouse/db/t/metadata/00001-8298c092-34a4-4bd1-bf38-5e5c905f04b0.metadata.json|82363968092352335
 |0               |1                     |{owner -> spark, 
write.parquet.compression-codec -> zstd}|
   
+-----------------------+-------------------------------------------------------------------------------------+------------------+----------------+----------------------+---------------------------------------------------------+
   
   spark.sql("ALTER TABLE db.t SET TBLPROPERTIES ('key1'='value')")
   spark.sql("SELECT * FROM db.t.metadata_log_entries").show(false)
   
+-----------------------+-------------------------------------------------------------------------------------+------------------+----------------+----------------------+------------------------------------------------------------------------+
   |timestamp              |file                                                
                                 
|latest_snapshot_id|latest_schema_id|latest_sequence_number|properties          
                                                    |
   
+-----------------------+-------------------------------------------------------------------------------------+------------------+----------------+----------------------+------------------------------------------------------------------------+
   |2026-08-20 
06:47:00.286|s3://warehouse/db/t/metadata/00000-4c91df99-f3eb-489c-950e-55415224b460.metadata.json|NULL
              |NULL            |NULL                  |{owner -> spark, 
write.parquet.compression-codec -> zstd}               |
   |2026-08-20 
06:47:40.675|s3://warehouse/db/t/metadata/00001-8298c092-34a4-4bd1-bf38-5e5c905f04b0.metadata.json|82363968092352335
 |0               |1                     |{owner -> spark, 
write.parquet.compression-codec -> zstd}               |
   |2026-08-20 
06:49:29.391|s3://warehouse/db/t/metadata/00002-41e0419e-beec-4ff1-944f-06c41e961f95.metadata.json|82363968092352335
 |0               |1                     |{owner -> spark, key1 -> value, 
write.parquet.compression-codec -> zstd}|
   
+-----------------------+-------------------------------------------------------------------------------------+------------------+----------------+----------------------+------------------------------------------------------------------------+
   */
   
   > ALTER TABLE db.t SET TBLPROPERTIES ('key2'='value2')
   > SELECT * FROM db.t.metadata_log_entries
   
   /*
   
+-----------------------+-------------------------------------------------------------------------------------+------------------+----------------+----------------------+----------------------------------------------------------------------------------------+
   |timestamp              |file                                                
                                 
|latest_snapshot_id|latest_schema_id|latest_sequence_number|properties          
                                                                    |
   
+-----------------------+-------------------------------------------------------------------------------------+------------------+----------------+----------------------+----------------------------------------------------------------------------------------+
   |2026-08-20 
06:47:00.286|s3://warehouse/db/t/metadata/00000-4c91df99-f3eb-489c-950e-55415224b460.metadata.json|NULL
              |NULL            |NULL                  |{owner -> spark, 
write.parquet.compression-codec -> zstd}                               |
   |2026-08-20 
06:47:40.675|s3://warehouse/db/t/metadata/00001-8298c092-34a4-4bd1-bf38-5e5c905f04b0.metadata.json|82363968092352335
 |0               |1                     |{owner -> spark, 
write.parquet.compression-codec -> zstd}                               |
   |2026-08-20 
06:49:29.391|s3://warehouse/db/t/metadata/00002-41e0419e-beec-4ff1-944f-06c41e961f95.metadata.json|82363968092352335
 |0               |1                     |{owner -> spark, key1 -> value, 
write.parquet.compression-codec -> zstd}                |
   |2026-08-20 
06:49:59.146|s3://warehouse/db/t/metadata/00003-ad8a3f69-a622-4c10-aabe-c083e724b15f.metadata.json|82363968092352335
 |0               |1                     |{owner -> spark, key1 -> value, key2 
-> value2, write.parquet.compression-codec -> zstd}|
   
+-----------------------+-------------------------------------------------------------------------------------+------------------+----------------+----------------------+----------------------------------------------------------------------------------------+
   */
   
   > ALTER TABLE db.t UNSET TBLPROPERTIES ('key1')
   > SELECT * FROM db.t.metadata_log_entries
   
   /*
   
+-----------------------+-------------------------------------------------------------------------------------+------------------+----------------+----------------------+----------------------------------------------------------------------------------------+
   |timestamp              |file                                                
                                 
|latest_snapshot_id|latest_schema_id|latest_sequence_number|properties          
                                                                    |
   
+-----------------------+-------------------------------------------------------------------------------------+------------------+----------------+----------------------+----------------------------------------------------------------------------------------+
   |2026-08-20 
06:47:00.286|s3://warehouse/db/t/metadata/00000-4c91df99-f3eb-489c-950e-55415224b460.metadata.json|NULL
              |NULL            |NULL                  |{owner -> spark, 
write.parquet.compression-codec -> zstd}                               |
   |2026-08-20 
06:47:40.675|s3://warehouse/db/t/metadata/00001-8298c092-34a4-4bd1-bf38-5e5c905f04b0.metadata.json|82363968092352335
 |0               |1                     |{owner -> spark, 
write.parquet.compression-codec -> zstd}                               |
   |2026-08-20 
06:49:29.391|s3://warehouse/db/t/metadata/00002-41e0419e-beec-4ff1-944f-06c41e961f95.metadata.json|82363968092352335
 |0               |1                     |{owner -> spark, key1 -> value, 
write.parquet.compression-codec -> zstd}                |
   |2026-08-20 
06:49:59.146|s3://warehouse/db/t/metadata/00003-ad8a3f69-a622-4c10-aabe-c083e724b15f.metadata.json|82363968092352335
 |0               |1                     |{owner -> spark, key1 -> value, key2 
-> value2, write.parquet.compression-codec -> zstd}|
   |2026-08-20 
06:50:40.097|s3://warehouse/db/t/metadata/00004-7bd63877-5476-464b-afa6-2c2fdff2113b.metadata.json|82363968092352335
 |0               |1                     |{owner -> spark, key2 -> value2, 
write.parquet.compression-codec -> zstd}               |
   
+-----------------------+-------------------------------------------------------------------------------------+------------------+----------------+----------------------+----------------------------------------------------------------------------------------+
   */
   ```


-- 
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: [email protected]

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