zhangbutao commented on code in PR #4292:
URL: https://github.com/apache/hive/pull/4292#discussion_r1203992759
##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergOutputCommitter.java:
##########
@@ -451,15 +452,21 @@ private void commitTable(FileIO io, ExecutorService
executor, OutputTable output
* @param startTime The start time of the commit - used only for logging
* @param results The object containing the new files we would like to add
to the table
*/
- private void commitWrite(Table table, long startTime, FilesForCommit
results) {
+ private void commitWrite(Table table, String branchName, long startTime,
FilesForCommit results) {
if (results.deleteFiles().isEmpty()) {
AppendFiles write = table.newAppend();
results.dataFiles().forEach(write::appendFile);
+ if (branchName != null) {
+ write.toBranch(branchName.substring(7));
Review Comment:
I added a new util method `HiveUtils::getTableBranch` in `ql `module to
extract the table's branch, so that `ql` module an `iceberg `handler module can
use this method to check and get branch info.
https://github.com/apache/hive/pull/4292/files#diff-9a5333458ddbc266f12512f60bd04fddd9deae5a76648eb109dbabdc0e13fc30R446
Please check if it is ok. Thanks.
--
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]