deniskuzZ commented on code in PR #5617:
URL: https://github.com/apache/hive/pull/5617#discussion_r1938329126


##########
hcatalog/server-extensions/src/main/java/org/apache/hive/hcatalog/listener/DbNotificationListener.java:
##########
@@ -1205,7 +1205,7 @@ private void 
addWriteNotificationLog(List<NotificationEvent> eventBatch, List<Ac
     String select = sqlGenerator.addForUpdateClause("select \"WNL_ID\", 
\"WNL_FILES\" from" +
             " \"TXN_WRITE_NOTIFICATION_LOG\" " +
             "where \"WNL_DATABASE\" = ? " +
-            "and \"WNL_TABLE\" = ? " + " and \"WNL_PARTITION\" = ? " +
+            "and \"WNL_TABLE\" = ? " + " and (\"WNL_PARTITION\" = ? OR 
\"WNL_PARTITION\" IS NULL) " +

Review Comment:
   1. why would we get an empty string ('') as partition name? 
   2. what if we have an empty partition and a non-empty, you'll lock and 
update both?
   
   



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

To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to