rahil-c commented on code in PR #13735:
URL: https://github.com/apache/hudi/pull/13735#discussion_r2366300427


##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/hudi/functional/TestMORDataSource.scala:
##########
@@ -1783,14 +1783,24 @@ class TestMORDataSource extends 
HoodieSparkClientTestBase with SparkDatasetMixin
 
   @ParameterizedTest
   @CsvSource(Array(
-    "6,8,true,UPGRADE", // Normal upgrade: table=6, write=8, autoUpgrade=true 
→ should upgrade
-    "6,9,true,UPGRADE", // Normal upgrade: table=6, write=9, autoUpgrade=true 
→ should upgrade
+    "4,8,false,EXCEPTION", // Auto-upgrade disabled: Should throw exception 
since table version is less than 6,
+    "4,8,true,EXCEPTION", // Auto-upgrade enabled: Should throw exception 
since table version is less than 6
     "6,6,false,NO_UPGRADE", // Auto-upgrade disabled: table=6, write=6, 
autoUpgrade=false → no upgrade
+    "6,6,true,NO_UPGRADE", // Auto-upgrade disabled: table=6, write=6, 
autoUpgrade=true → no version change,
     "6,8,false,NO_UPGRADE", // Auto-upgrade disabled: table=6, write=8, 
autoUpgrade=false → no upgrade
-    "4,8,true,EXCEPTION", // Auto-upgrade enabled: Should throw exception 
since table version is less than 6
-    "4,8,false,EXCEPTION", // Auto-upgrade disabled: Should throw exception 
since table version is less than 6
+    "6,8,true,UPGRADE", // Normal upgrade: table=6, write=8, autoUpgrade=true 
→ should upgrade
+    "6,9,false,NO_UPGRADE", // Normal upgrade: table=6, write=9, 
autoUpgrade=false → no upgrade
+    "6,9,true,UPGRADE", // Normal upgrade: table=6, write=9, autoUpgrade=true 
→ should upgrade
+    "8,6,false,NO_UPGRADE", // Auto-upgrade disabled: table=8, write=6, 
autoUpgrade=false → no upgrade
+    "8,6,true,EXCEPTION", // Auto-upgrade enabled: table=8, write=6, 
autoUpgrade=true → should throw

Review Comment:
   should we throw for this case? Or just take the write.table.version match 
the table version and continute?



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