[ 
https://issues.apache.org/jira/browse/HIVE-27337?focusedWorklogId=861706&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-861706
 ]

ASF GitHub Bot logged work on HIVE-27337:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 12/May/23 09:51
            Start Date: 12/May/23 09:51
    Worklog Time Spent: 10m 
      Work Description: aturoczy commented on code in PR #4316:
URL: https://github.com/apache/hive/pull/4316#discussion_r1192160534


##########
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:
   won't it be much more better if the getDbName and the getTableName getter do 
the trim?





Issue Time Tracking
-------------------

    Worklog Id:     (was: 861706)
    Time Spent: 0.5h  (was: 20m)

> create and alter queries should trim empty spaces in the request objects.
> -------------------------------------------------------------------------
>
>                 Key: HIVE-27337
>                 URL: https://issues.apache.org/jira/browse/HIVE-27337
>             Project: Hive
>          Issue Type: Bug
>          Components: Standalone Metastore
>    Affects Versions: 4.0.0-alpha-2
>            Reporter: Sai Hemanth Gantasala
>            Assignee: Sai Hemanth Gantasala
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> If starting/trailing empty strings are being provided in the query (within 
> the quotes),
> Create table request (event) is currently being inserted into the 
> notification log table. This would be a problem for listeners subscribed to 
> the HMS notification log. So it would be ideal to trim these whitespaces and 
> then insert it into the notification log. 
> Alter table query is throwing an error 
> [here|https://github.com/apache/hive/blob/master/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java#L174].
>  The ideal behavior should be to ignore the whitespaces and proceed with 
> alter request.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to