Dear Hive community,

I would like to hear your feedback about some syntax sugar for iceberg
branching. If somebody is not aware of this cool feature please read out
the following blog post
<https://medium.com/@ayushtkn/apache-hive-4-x-with-iceberg-branches-tags-3d52293ac0bf>
.

Currently, Hive is implementing branching as per the official
<https://iceberg.apache.org/docs/1.6.1/branching/> recommendation, which is
fine, but there's something about the syntax that feels out of place in
modern SQL linguistics. Today, any new functionality tends to be added
under the ALTER TABLE umbrella. However, ALTER TABLE is increasingly
overloaded with diverse functionalities across different engines, making it
less intuitive. (To me the ALTER TABLE is kinda ETC in the SQL linguistic)

Many DBAs I’ve worked with are comfortable with commands like CREATE, SELECT,
and INSERT, but when it comes to ALTER, things often get more complex and
everybody starts to google it.

This is particularly true now with the introduction of iceberg branching
and tagging features, which are some of the most exciting developments
since somebody invited Spotify! :) But from a usability perspective, this
syntax is challenging to remember and use.

In customer demos, I've been asked why the syntax is so complicated. In my
view, these key features deserve dedicated verbs, making them distinct and
straightforward.

As a proposal, I’d suggest introducing new syntax options specifically for
branching and tagging. *This wouldn’t replace the current approach but
could be an alternative that enhances clarity and ease of use.*
Create branch:

CREATE BRANCH audit_branch FROM audit;

>From snapshot:

CREATE BRANCH audit_branch FROM audit AS OF VERSION 1234; **

** Maybe the FORM here Could be* AT <CommitID>*

Create tag:

CREATE TAG historical_tag FROM audit.

same as for AS OF

Drop branch:

DROP BRANCH audit_branch;

Drop Tag:

DROP TAG audit_branch;

Your opinion is very important to us, as it helps determine whether this is
primarily a usability concern for a handful of EU customers, or if it might
be better overall to stick with the classic ALTER approach.
-Attila

Reply via email to