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

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

                Author: ASF GitHub Bot
            Created on: 04/Jun/21 16:34
            Start Date: 04/Jun/21 16:34
    Worklog Time Spent: 10m 
      Work Description: nareshpr commented on a change in pull request #2125:
URL: https://github.com/apache/hive/pull/2125#discussion_r645684651



##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetastoreDefaultTransformer.java
##########
@@ -833,9 +833,9 @@ private Table validateTablePaths(Table table) throws 
MetaException {
         dbLocation = Path.getPathWithoutSchemeAndAuthority(new 
Path(db.getLocationUri()));
         Path tablePath = null;
         if (!FileUtils.isSubdirectory(whRootPath.toString(), 
dbLocation.toString())) {
-          tablePath = new Path(db.getLocationUri(), table.getTableName());
+          tablePath = new Path(db.getLocationUri(), 
table.getTableName().toLowerCase());
         } else {
-          tablePath = hmsHandler.getWh().getDefaultTablePath(db, 
table.getTableName(), true);
+          tablePath = hmsHandler.getWh().getDefaultTablePath(db, 
table.getTableName().toLowerCase(), true);

Review comment:
       this change might not be required, as getDefaultTablePath is already 
taking care of it.

##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetastoreDefaultTransformer.java
##########
@@ -833,9 +833,9 @@ private Table validateTablePaths(Table table) throws 
MetaException {
         dbLocation = Path.getPathWithoutSchemeAndAuthority(new 
Path(db.getLocationUri()));
         Path tablePath = null;
         if (!FileUtils.isSubdirectory(whRootPath.toString(), 
dbLocation.toString())) {
-          tablePath = new Path(db.getLocationUri(), table.getTableName());
+          tablePath = new Path(db.getLocationUri(), 
table.getTableName().toLowerCase());

Review comment:
       Please check MetaStoreUtils.encodeTableName is required for tableName at 
here as well.




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

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


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

    Worklog Id:     (was: 607188)
    Time Spent: 20m  (was: 10m)

> Table created with Uppercase name using CTAS does not produce result for 
> select queries
> ---------------------------------------------------------------------------------------
>
>                 Key: HIVE-24951
>                 URL: https://issues.apache.org/jira/browse/HIVE-24951
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore
>    Affects Versions: 4.0.0
>            Reporter: Rajkumar Singh
>            Assignee: Rajkumar Singh
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Steps to repro:
> {code:java}
> CREATE EXTERNAL TABLE MY_TEST AS SELECT * FROM source
> Table created with Location but does not have any data moved to it.
> /warehouse/tablespace/external/hive/MY_TEST
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to