jcamachor commented on a change in pull request #749: HIVE-21344 URL: https://github.com/apache/hive/pull/749#discussion_r333767332
########## File path: ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveMaterializedViewsRegistry.java ########## @@ -159,15 +165,36 @@ public void run() { SessionState ss = new SessionState(db.getConf()); ss.setIsHiveServerQuery(true); // All is served from HS2, we do not need e.g. Tez sessions SessionState.start(ss); - final boolean cache = !db.getConf() - .get(HiveConf.ConfVars.HIVE_SERVER2_MATERIALIZED_VIEWS_REGISTRY_IMPL.varname).equals("DUMMY"); - for (Table mv : db.getAllMaterializedViewObjectsForRewriting()) { - addMaterializedView(db.getConf(), mv, OpType.LOAD, cache); + if (initialized.get()) { + for (Table mvTable : db.getAllMaterializedViewObjectsForRewriting()) { Review comment: Good idea! ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org