You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "zhangbutao (via GitHub)" <gi...@apache.org> on 2023/06/02 05:43:33 UTC

[GitHub] [hive] zhangbutao commented on a diff in pull request #4292: HIVE-27302: Iceberg: Suport write to iceberg branch

zhangbutao commented on code in PR #4292:
URL: https://github.com/apache/hive/pull/4292#discussion_r1213946754


##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveUtils.java:
##########
@@ -107,6 +109,7 @@ public static String escapeString(String str) {
   static final byte[] tabEscapeBytes = "\\t".getBytes();;
   static final byte[] tabUnescapeBytes = "\t".getBytes();
   static final byte[] ctrlABytes = "\u0001".getBytes();
+  static final Pattern BRANCH = Pattern.compile("branch_(.*)");

Review Comment:
   It is only used to extract branch name from the table suffix `tableMetaRef `https://github.com/apache/hive/pull/4292/files#diff-42b2d7dcd39e3f43dd8da948858388f92d2213a4963ab7e08cb92df6cc06453dR40
   
   e.g. the three layer table ref identifier `dbName.tblName.tblMetaRef` --> `testdb.testtbl.branch_test1`, we will get actual branch from the `tblMetaRef` ->`test1`.
   
   So it does't matter if table or database has branch.



-- 
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: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org