nsivabalan commented on code in PR #14115:
URL: https://github.com/apache/hudi/pull/14115#discussion_r2458619283


##########
hudi-common/src/main/java/org/apache/hudi/common/table/HoodieTableVersion.java:
##########
@@ -78,7 +78,16 @@ public static HoodieTableVersion current() {
   public static HoodieTableVersion fromVersionCode(int versionCode) {
     return Arrays.stream(HoodieTableVersion.values())
         .filter(v -> v.versionCode == versionCode).findAny()
-        .orElseThrow(() -> new HoodieException("Unknown table versionCode:" + 
versionCode));
+        .orElseThrow(() -> new HoodieException(
+            "Table version mismatch detected. "
+                + "The table was created with a Hudi version that has table 
version code " + versionCode
+                + " but you're using an older version.\n"
+                + "Likely you are using a lower hudi binary version to read a 
table written using higher hudi version which is not supported. "
+                + "To fix this issue:\n"
+                + "  - Please upgrade your readers to use the same version as 
writers\n"
+                + "  - Table version code: " + versionCode + "\n"
+                + "  - Current supported versions: " + 
Arrays.toString(HoodieTableVersion.values()) + "\n"
+                + "See: https://hudi.apache.org/docs/migration_guide for more 
information"));

Review Comment:
   I am pushing out a commit to fix this. 
   this can only happen if X hudi lib version is used to read a table written 
by higher (Y) hudi version, where X and Y refers to table version. 
   
   



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

Reply via email to