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


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/jdbc/queries/LatestTxnIdInConflictHandler.java:
##########
@@ -58,15 +58,15 @@ public String getParameterizedQueryString(DatabaseProduct 
databaseProduct) throw
         " ) \"CUR\"" +
         " ON \"COMMITTED\".\"WS_DATABASE\" = \"CUR\".\"TC_DATABASE\"" +
         "   AND \"COMMITTED\".\"WS_TABLE\" = \"CUR\".\"TC_TABLE\"" +
-        (TxnHandler.ConfVars.useMinHistoryLevel() ? "" :
-        "   AND \"COMMITTED\".\"WS_OPERATION_TYPE\" != :wsType") + 
         // For partitioned table we always track writes at partition level 
(never at table)
         // and for non partitioned - always at table level, thus the same 
table should never
         // have entries with partition key and w/o
         "   AND (\"COMMITTED\".\"WS_PARTITION\" = \"CUR\".\"TC_PARTITION\" OR" 
+
         "     \"CUR\".\"TC_PARTITION\" IS NULL) " +
         // txns overlap
-        " WHERE \"CUR\".\"TC_TXNID\" <= \"COMMITTED\".\"WS_COMMIT_ID\"";
+        " WHERE \"CUR\".\"TC_TXNID\" <= \"COMMITTED\".\"WS_COMMIT_ID\"" +

Review Comment:
   just moved predicate under the WHERE clause



##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/jdbc/queries/LatestTxnIdInConflictHandler.java:
##########
@@ -58,15 +58,15 @@ public String getParameterizedQueryString(DatabaseProduct 
databaseProduct) throw
         " ) \"CUR\"" +
         " ON \"COMMITTED\".\"WS_DATABASE\" = \"CUR\".\"TC_DATABASE\"" +
         "   AND \"COMMITTED\".\"WS_TABLE\" = \"CUR\".\"TC_TABLE\"" +
-        (TxnHandler.ConfVars.useMinHistoryLevel() ? "" :
-        "   AND \"COMMITTED\".\"WS_OPERATION_TYPE\" != :wsType") + 
         // For partitioned table we always track writes at partition level 
(never at table)
         // and for non partitioned - always at table level, thus the same 
table should never
         // have entries with partition key and w/o
         "   AND (\"COMMITTED\".\"WS_PARTITION\" = \"CUR\".\"TC_PARTITION\" OR" 
+
         "     \"CUR\".\"TC_PARTITION\" IS NULL) " +
         // txns overlap
-        " WHERE \"CUR\".\"TC_TXNID\" <= \"COMMITTED\".\"WS_COMMIT_ID\"";
+        " WHERE \"CUR\".\"TC_TXNID\" <= \"COMMITTED\".\"WS_COMMIT_ID\"" +

Review Comment:
   just moved the predicate under the WHERE clause



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to