Skip to content

Conversation

@zhangbutao
Copy link
Contributor

@zhangbutao zhangbutao commented May 4, 2023

What changes were proposed in this pull request?

Added ability to write iceberg branch by table identifier dbName.tblName.branch_branchName, and this syntax refers to spark-iceberg apache/iceberg#6965.
e.g, insert branch test1 of iceberg table default.ice01:
insert into default.ice01.branch_test1 values(123);
query branch test1:
select * from default.ice01.branch_test1;

The keyword branch_ can distinguish between metadata tables and branch. User can query iceberg metadata table ussing follow syntax introduced by HIVE-25457. e.g, query metadata table refs:
select * from default.ice01.refs;

This PR is mainly built on HIVE-25344 and HIVE-25457, and its work mainly focused on propagating branch name to iceberg scan API, then we can query&write iceberg table.

Why are the changes needed?

Does this PR introduce any user-facing change?

Added a new table identifier to query&write iceberg table.

How was this patch tested?

mvn test -Dtest.output.overwrite -Dtest=TestIcebergCliDriver -Dqfile=write_iceberg_branch.q -pl itests/qtest-iceberg -Piceberg -Pitests -Drat.skip

@zhangbutao
Copy link
Contributor Author

@ayushtkn @deniskuzZ Can we continue with this PR? Thanks.

Comment on lines 559 to 561
default boolean isMetadataTableSupported() {
return false;
}
Copy link
Member

Choose a reason for hiding this comment

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

Should be

  @Deprecated
  default boolean isMetadataTableSupported() {
    return isTableMetaRefSupported();
  }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. Fixed.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 8, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 10 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@deniskuzZ deniskuzZ removed the request for review from miklosgergely June 8, 2023 13:48
@ayushtkn ayushtkn merged commit e0bf960 into apache:master Jun 8, 2023
yeahyung pushed a commit to yeahyung/hive that referenced this pull request Jul 20, 2023
…Butao Zhang, reviewed by Denys Kuzmenko, Ayush Saxena)
tarak271 pushed a commit to tarak271/hive-1 that referenced this pull request Dec 19, 2023
…Butao Zhang, reviewed by Denys Kuzmenko, Ayush Saxena)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants