Skip to content

Conversation

@okumin
Copy link
Contributor

@okumin okumin commented Jan 2, 2025

Hive supports the history table.
https://github.com/apache/hive/blob/master/iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/IcebergMetadataTables.java

I verified it would work with the latest version, 4.0.1.

0: jdbc:hive2://localhost:10000/> CREATE TABLE test (id INT) STORED BY ICEBERG;
...
0: jdbc:hive2://localhost:10000/> INSERT INTO test VALUES (1);
...
0: jdbc:hive2://localhost:10000/> INSERT INTO test VALUES (2);
...
0: jdbc:hive2://localhost:10000/> SELECT * FROM default.test.history;
...
+----------------------------------+----------------------+----------------------+---------------------------+
|       test.made_current_at       |   test.snapshot_id   |    test.parent_id    | test.is_current_ancestor  |
+----------------------------------+----------------------+----------------------+---------------------------+
| 2025-01-02 10:14:19.954 Etc/UTC  | 4408216953068462947  | NULL                 | true                      |
| 2025-01-02 10:14:22.559 Etc/UTC  | 4271863120661887759  | 4408216953068462947  | true                      |
+----------------------------------+----------------------+----------------------+---------------------------+
...
0: jdbc:hive2://localhost:10000/> SELECT version();
...
+--------------------------------------------------+
|                       _c0                        |
+--------------------------------------------------+
| 4.0.1 r3af4517eb8cfd9407ad34ed78a0b48b57dfaa264  |
+--------------------------------------------------+

@github-actions github-actions bot added the docs label Jan 2, 2025

* all_data_files
* all_delete_files
* all_entries all_files
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I split this one into two lines. All the other diff have been caused by removing extra trailing spaces.
https://github.com/apache/iceberg/pull/11902/files?w=1

@pvary pvary merged commit ab6365d into apache:main Jan 2, 2025
2 checks passed
@pvary
Copy link
Contributor

pvary commented Jan 2, 2025

Thanks @okumin for the fix!

@okumin okumin deleted the doc-hive-metadata branch January 3, 2025 03:36
@okumin
Copy link
Contributor Author

okumin commented Jan 3, 2025

Thanks for merging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants