sankarh commented on a change in pull request #541: HIVE-21197 : Hive
Replication can add duplicate data during migration to a target with
hive.strict.managed.tables enabled
URL: https://github.com/apache/hive/pull/541#discussion_r259772504
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/parse/ImportSemanticAnalyzer.java
##########
@@ -1147,6 +1145,12 @@ private static void createReplImportTasks(
if (!waitOnPrecursor){
throw new
SemanticException(ErrorMsg.DATABASE_NOT_EXISTS.getMsg(tblDesc.getDatabaseName()));
}
+ // For warehouse level replication, if the database itself is getting
created in this load, then no need to
+ // check for duplicate copy. Check HIVE-21197 for more detail.
+ firstIncPending = false;
+ } else {
+ // For database replication, get the flag from database parameter. Check
HIVE-21197 for more detail.
+ firstIncPending = ReplUtils.isFirstIncPending(parentDb.getParameters());
Review comment:
Yes, functionally it is right... But not so readable as we assume this flag
is false from DB if table level replication. Pls add a comment.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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