Skip to content

Commit

Permalink
HIVE-28622: Duplicate Entries in TXN_WRITE_NOTIFICATION_LOG Due to Or…
Browse files Browse the repository at this point in the history
…acle's Handling of Empty Strings (Harshal Patel, reviewed by Denys Kuzmenko, Teddy Choi)

Closes #5617
  • Loading branch information
harshal-16 authored Feb 8, 2025
1 parent 04c1102 commit 9002aba
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 (? IS NULL AND \"WNL_PARTITION\" IS NULL)) " +
"and \"WNL_TXNID\" = ? ");
List<Integer> insertList = new ArrayList<>();
Map<Integer, Pair<Long, String>> updateMap = new HashMap<>();
Expand All @@ -1221,7 +1221,8 @@ private void addWriteNotificationLog(List<NotificationEvent> eventBatch, List<Ac
pst.setString(1, dbName);
pst.setString(2, tblName);
pst.setString(3, partition);
pst.setLong(4, txnId);
pst.setString(4, partition);
pst.setLong(5, txnId);
rs = pst.executeQuery();
if (!rs.next()) {
insertList.add(i);
Expand Down

0 comments on commit 9002aba

Please sign in to comment.