lvyanquan opened a new pull request, #5662:
URL: https://github.com/apache/iceberg/pull/5662

   In the pr of https://github.com/apache/iceberg/pull/4516, we added specId 
for partitions metadata table, but the document of 
query(https://iceberg.apache.org/docs/latest/spark-queries/#partitions ) hasn't 
been changed to adapt to that. 
   What's more, the ResultSet structures are not the same between partitioned 
and not-partitioned tables.
   
   query example:
   ```shell
   0: jdbc:hive2://host:10000> create table p (id int, age int) using iceberg 
partitioned by (id);
   0: jdbc:hive2://host:10000> create table np (id int, age int) using iceberg;
   0: jdbc:hive2://host:10000> insert into p(id, age) values (1,1),(2,2),(3,3);
   0: jdbc:hive2://host:10000> insert into np(id, age) values (1,1),(2,2),(3,3);
   0: jdbc:hive2://host:10000> select * from 
spark_catalog.kunni_db.p.partitions;
   +------------+---------------+-------------+----------+
   | partition  | record_count  | file_count  | spec_id  |
   +------------+---------------+-------------+----------+
   | {"id":2}   | 1             | 1           | 0        |
   | {"id":3}   | 1             | 1           | 0        |
   | {"id":1}   | 1             | 1           | 0        |
   +------------+---------------+-------------+----------+
   3 rows selected (0.185 seconds)
   0: jdbc:hive2://host:10000> select * from 
spark_catalog.kunni_db.np.partitions;
   +---------------+-------------+
   | record_count  | file_count  |
   +---------------+-------------+
   | 3             | 3           |
   +---------------+-------------+
   1 row selected (0.126 seconds)
   ```


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