maheshk114 commented on a change in pull request #900: HIVE-22860 Support 
metadata only replication for external tables
URL: https://github.com/apache/hive/pull/900#discussion_r378096951
 
 

 ##########
 File path: 
ql/src/java/org/apache/hadoop/hive/ql/parse/repl/dump/events/AlterTableHandler.java
 ##########
 @@ -229,7 +230,9 @@ public void handle(Context withinContext) throws Exception 
{
       // If we are not dumping metadata about a table, we shouldn't be dumping 
basic statistics
       // as well, since that won't be accurate. So reset them to what they 
would look like for an
       // empty table.
-      if 
(withinContext.hiveConf.getBoolVar(HiveConf.ConfVars.REPL_DUMP_METADATA_ONLY)) {
+      if 
(withinContext.hiveConf.getBoolVar(HiveConf.ConfVars.REPL_DUMP_METADATA_ONLY) ||
+              (qlMdTableAfter.getTableType().equals(TableType.EXTERNAL_TABLE)
+              && 
withinContext.hiveConf.getBoolVar(HiveConf.ConfVars.REPL_DUMP_METADATA_ONLY_FOR_EXTERNAL_TABLE)))
 {
 
 Review comment:
   This check can be put as an util method ..taking table object/type and 
config object

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


With regards,
Apache Git Services

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

Reply via email to