private boolean isMaterializedViewMaintenance() {
      return mvRebuildMode != MaterializationRebuildMode.NONE
          || ctx.isLoadingMaterializedView()
          || getQB().isMaterializedView();
    }
Returns true if MV is being loaded, constructed or being rebuilt.
ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java