sankarh commented on a change in pull request #664: HIVE-21762: REPL DUMP to 
support new format for replication policy input to take included tables list.
URL: https://github.com/apache/hive/pull/664#discussion_r291877697
 
 

 ##########
 File path: ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g
 ##########
 @@ -924,6 +926,30 @@ replConfigsList
       keyValueProperty (COMMA keyValueProperty)* -> ^(TOK_REPL_CONFIG_LIST 
keyValueProperty+)
     ;
 
+replTableLevelPolicy
+@init { pushMsg("replication table level policy definition", state); }
+@after { popMsg(state); }
+    :
+      ((replTablesIncludeList=replTablesList) (DOT 
replTablesExcludeList=replTablesList)?)
+      -> ^(TOK_REPL_TABLES $replTablesIncludeList $replTablesExcludeList?)
+    ;
+
+replTablesList
+@init { pushMsg("replication table name or comma separated table names pattern 
list", state); }
+@after { popMsg(state); }
+    :
+      (replTable=identifier) -> ^(TOK_TABNAME $replTable)
+      |
+      (LSQUARE (tablePattern (COMMA tablePattern)*)? RSQUARE) -> 
^(TOK_REPL_TABLES_LIST tablePattern+)
 
 Review comment:
   It reads as empty include list or exclude list. But, the difference is if 
include list is empty, it means, all tables are included where as exclude list 
is empty means nothing is excluded. 
   For example, Full Db replication with exclude list, user may provide 
<db_name>.[].[t1, t100].
   Please share your opinion on if this behaviour is fine or should we consider 
empty include list as no tables included but only functions.

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