You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/03/27 06:28:39 UTC

[GitHub] [hive] rajkrrsingh opened a new pull request #2125: Hive 24951 : Table created with Uppercase name using CTAS does not produce result for select queries

rajkrrsingh opened a new pull request #2125:
URL: https://github.com/apache/hive/pull/2125


   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://cwiki.apache.org/confluence/display/Hive/HowToContribute
     2. Ensure that you have created an issue on the Hive project JIRA: https://issues.apache.org/jira/projects/HIVE/summary
     3. Ensure you have added or run the appropriate tests for your PR: 
     4. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP]HIVE-XXXXX:  Your PR title ...'.
     5. Be sure to keep the PR description updated to reflect all changes.
     6. Please write your PR title to summarize what this PR proposes.
     7. If possible, provide a concise example to reproduce the issue for a faster review.
   
   -->
   
   ### What changes were proposed in this pull request?
   Metastore transformer create table location based on the table name which is in upper case while LoadWork create the target location in lower case, so effectively table has two location because of this. with this change I am planning to do the change so the Metastore transformer return the location in lower case which can be aligned with the loadwork targetPath.
   
   ### Why are the changes needed?
   without this change CTAS will create 2 location for the same table and since move path moved the location to the path ending with lower case then table will not be readable.
   
   ### Does this PR introduce _any_ user-facing change?
   NO
   
   
   ### How was this patch tested?
   Tested on internal cluster with reproduce mentioned on the JIRA


-- 
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:
users@infra.apache.org



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


[GitHub] [hive] nrg4878 commented on pull request #2125: HIVE-24951 : Table created with Uppercase name using CTAS does not produce result for select queries

Posted by GitBox <gi...@apache.org>.
nrg4878 commented on pull request #2125:
URL: https://github.com/apache/hive/pull/2125#issuecomment-865187692


   Fix has been merged to master.


-- 
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:
users@infra.apache.org



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


[GitHub] [hive] kgyrtkirk commented on a change in pull request #2125: HIVE-24951 : Table created with Uppercase name using CTAS does not produce result for select queries

Posted by GitBox <gi...@apache.org>.
kgyrtkirk commented on a change in pull request #2125:
URL: https://github.com/apache/hive/pull/2125#discussion_r645391817



##########
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);

Review comment:
       why don't we move this `toLowerCase` into the `getDefaultTablePath` function?




-- 
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:
users@infra.apache.org



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


[GitHub] [hive] nrg4878 commented on pull request #2125: HIVE-24951 : Table created with Uppercase name using CTAS does not produce result for select queries

Posted by GitBox <gi...@apache.org>.
nrg4878 commented on pull request #2125:
URL: https://github.com/apache/hive/pull/2125#issuecomment-865187692


   Fix has been merged to master.


-- 
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:
users@infra.apache.org



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


[GitHub] [hive] github-actions[bot] commented on pull request #2125: HIVE-24951 : Table created with Uppercase name using CTAS does not produce result for select queries

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #2125:
URL: https://github.com/apache/hive/pull/2125#issuecomment-903016284


   This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
   Feel free to reach out on the dev@hive.apache.org list if the patch is in need of reviews.


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


[GitHub] [hive] nareshpr commented on a change in pull request #2125: HIVE-24951 : Table created with Uppercase name using CTAS does not produce result for select queries

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org



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


[GitHub] [hive] github-actions[bot] closed pull request #2125: HIVE-24951 : Table created with Uppercase name using CTAS does not produce result for select queries

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed pull request #2125:
URL: https://github.com/apache/hive/pull/2125


   


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