dengzhhu653 commented on a change in pull request #3138:
URL: https://github.com/apache/hive/pull/3138#discussion_r835034203



##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreSchemaInfo.java
##########
@@ -205,19 +206,32 @@ public boolean isVersionCompatible(String hiveVersion, 
String dbVersion) {
       return false;
     }
 
-    for (int i = 0; i < dbVerParts.length; i++) {
-      int dbVerPart = Integer.parseInt(dbVerParts[i]);
-      int hiveVerPart = Integer.parseInt(hiveVerParts[i]);
-      if (dbVerPart > hiveVerPart) {
-        return true;
-      } else if (dbVerPart < hiveVerPart) {
-        return false;
-      } else {
-        continue; // compare next part
+    int i = 0;

Review comment:
       If `i` reaches the end of `dbVerParts`, means that the hive version is 
behind the db version, which supposed to be compatiable. For example,
   dbVerParts is `4`, `0`, `0`
   hiveVerParts is `4`, `0`, `0`, `alpha`, `1`
   
   the `hiveVerParts.length == dbVerParts.length;` returns false in this case.




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