yihua commented on code in PR #13677:
URL: https://github.com/apache/hudi/pull/13677#discussion_r2268273835


##########
hudi-common/src/main/java/org/apache/hudi/common/table/HoodieTableMetaClient.java:
##########
@@ -1591,6 +1589,20 @@ public Properties build() {
       return tableConfig.getProps();
     }
 
+    HoodieTableVersion getTableVersionProperly() {
+      if (tableVersion == null) {
+        return HoodieTableVersion.current();
+      } else if (tableVersion.greaterThanOrEquals(HoodieTableVersion.SIX)) {
+        return tableVersion;
+      } else {
+        String errorMessage = String.format(
+            "Creating a table in version \"%d\" is not allowed in current Hudi 
binary. "

Review Comment:
   No longer needed



##########
hudi-spark-datasource/hudi-spark/src/test/java/org/apache/hudi/table/upgrade/TestUpgradeDowngrade.java:
##########
@@ -347,6 +355,60 @@ public void 
testMetadataTableUpgradeDowngradeFailure(HoodieTableVersion fromVers
         "Exception message should contain metadata table failure message");
   }
 
+  @ParameterizedTest
+  @CsvSource({"1","2","3","4","5","6","7","8","9","null"})
+  void testTableVersionDuringTableCreation(String targetTableVersion) {

Review Comment:
   Fixed.



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