dengzhhu653 commented on code in PR #5542:
URL: https://github.com/apache/hive/pull/5542#discussion_r2010026905


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetastoreDirectSqlUtils.java:
##########
@@ -152,9 +154,18 @@ static <T> int loopJoinOrderedResult(PersistenceManager 
pm, TreeMap<Long, T> tre
           if (nestedId < id) {
             throw new MetaException("Found entries for unknown ID " + 
nestedId);
           }
-          if (nestedId > id)
+          if (nestedId > id) {
+            if (!tree.containsKey(nestedId)) {
+              Throwable throwable = (new Throwable()).fillInStackTrace();

Review Comment:
   not enough, for example, if the value is a `Partition`, then what are 
missing for this `nestedId` Partition, it might be the values stored in 
`PARTITION_KEY_VALS` or the parameters in `PARTITION_PARAMS`, if we shows the 
message who makes the call, it will direct us to the table quickly to check if 
this table is corrupted or not.



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