pvary commented on a change in pull request #2921:
URL: https://github.com/apache/hive/pull/2921#discussion_r793292863



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java
##########
@@ -97,6 +101,40 @@ public MoveTask() {
     super();
   }
 
+  public void flattenUnionSubdirectories(Path sourcePath) throws HiveException 
{
+    try {
+      FileSystem fs = sourcePath.getFileSystem(conf);
+      LOG.info("Checking " + sourcePath + " for subdirectories to flatten");
+      Set<Path> unionSubdirs = new HashSet<>();
+      if (fs.exists(sourcePath)) {
+        RemoteIterator<LocatedFileStatus> i = fs.listFiles(sourcePath, true);

Review comment:
       You have mentioned that for ACID does not need this. Could we avoid 
these calls when they are not needed? Otherwise we make every query slower




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to