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

[GitHub] [hive] dengzhhu653 commented on a diff in pull request #4316: HIVE-27337: Trim the starting and trailing white spaces in HMS for cr…

dengzhhu653 commented on code in PR #4316:
URL: https://github.com/apache/hive/pull/4316#discussion_r1193061632


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java:
##########
@@ -2276,6 +2276,9 @@ private void create_table_core(final RawStore ms, final CreateTableRequest req)
           + " already exists");
     }
 
+    tbl.setDbName(tbl.getDbName().trim());

Review Comment:
   There is `org.apache.hadoop.hive.metastore.utils.StringUtils.normalizeIdentifier` to take care of the trim, could we reuse this method?



##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java:
##########
@@ -2276,6 +2276,9 @@ private void create_table_core(final RawStore ms, final CreateTableRequest req)
           + " already exists");
     }
 
+    tbl.setDbName(tbl.getDbName().trim());

Review Comment:
   There is a `org.apache.hadoop.hive.metastore.utils.StringUtils.normalizeIdentifier` to take care of the trim, could we reuse this method?



-- 
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