pkumarsinha commented on a change in pull request #2151:
URL: https://github.com/apache/hive/pull/2151#discussion_r618048430



##########
File path: 
ql/src/java/org/apache/hadoop/hive/ql/parse/ImportSemanticAnalyzer.java
##########
@@ -1406,4 +1439,114 @@ public static Table tableIfExists(ImportTableDesc 
tblDesc, Hive db) throws HiveE
     }
   }
 
+  public static class LoadTableStateWrapper {

Review comment:
       Why are both LoadTableStateWrapper and DelayExecUtil needed? They are 
almost alike

##########
File path: ql/src/java/org/apache/hadoop/hive/ql/plan/CopyWork.java
##########
@@ -136,4 +140,18 @@ public boolean isOverwrite() {
   public void setOverwrite(boolean overwrite) {
     this.overwrite = overwrite;
   }
+
+  public void setLoadTableStateWrapper(LoadTableStateWrapper 
loadTableStateWrapper) {
+    this.loadTableStateWrapper = loadTableStateWrapper;
+  }
+
+  public void setValuesBeforeExec() throws HiveException {
+    if (loadTableStateWrapper == null) {
+      return;
+    }
+
+    Table table = loadTableStateWrapper.getTableIfExists();

Review comment:
       CopyWork was generic in nature. setValuesBeforeExec is tying it to 
resolve the path only from table. All we need is to be able to resolve the path 
dynamically. A resolver interface should be prefered. 




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



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

Reply via email to