marton-bod commented on a change in pull request #2419:
URL: https://github.com/apache/hive/pull/2419#discussion_r658739899



##########
File path: 
ql/src/java/org/apache/hadoop/hive/ql/parse/ColumnStatsAutoGatherContext.java
##########
@@ -71,13 +71,21 @@
   private Context origCtx;
   
   public ColumnStatsAutoGatherContext(SemanticAnalyzer sa, HiveConf conf,
-      Operator<? extends OperatorDesc> op, Table tbl, Map<String, String> 
partSpec,
+      Operator<? extends OperatorDesc> op, Table origTbl, Map<String, String> 
partSpec,
       boolean isInsertInto, Context ctx) throws SemanticException {
     super();
     this.sa = sa;
     this.conf = conf;
     this.op = op;
-    this.tbl = tbl;
+    try {
+      this.tbl = origTbl.copy();
+    } catch (HiveException he) {
+      throw new SemanticException(he);
+    }
+    if (tbl.getStorageHandler().alwaysUnpartitioned()) {

Review comment:
       Can the storage handler be null?




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