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 2022/05/15 16:42:42 UTC

[GitHub] [hive] ganeshashree commented on a diff in pull request #3231: HIVE-22013: SHOW TABLE EXTENDED query fails with Wrong FS error for partition in customized location

ganeshashree commented on code in PR #3231:
URL: https://github.com/apache/hive/pull/3231#discussion_r873194842


##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/info/show/status/formatter/ShowTableStatusFormatter.java:
##########
@@ -123,13 +123,17 @@ FileData getFileData(HiveConf conf, List<Path> locations, Path tablePath) throws
     if (!fileData.unknown) {
       for (Path location : locations) {
         try {
-          FileStatus status = fileSystem.getFileStatus(location);
+          // Use right FileSystem object for partition in customized location
+          FileSystem locationFileSystem = location.toString().startsWith(tablePath.toString()) ? fileSystem
+              : location.getFileSystem(conf);

Review Comment:
   @ayushtkn Thanks for reviewing. It makes sense to match scheme and authority. Please review the updated PR.



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