hudi-agent commented on code in PR #18862:
URL: https://github.com/apache/hudi/pull/18862#discussion_r3322220048


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/HoodieTableFactory.java:
##########
@@ -216,29 +216,22 @@ private void checkIndexType(Configuration conf) {
   }
 
   /**
-   * Validate the base file format. Flink Lance support is scoped to 
append-only COW tables.
+   * Validate the base file format. Flink Lance support is scoped to COW 
tables.
    */
-  private void checkBaseFileFormatForRead(Configuration conf, ResolvedSchema 
schema) {
-    checkLanceBaseFileFormat(conf, schema);
+  private void checkBaseFileFormatForRead(Configuration conf) {
+    checkLanceBaseFileFormat(conf);
   }
 
-  private void checkBaseFileFormatForWrite(Configuration conf, ResolvedSchema 
schema) {
-    checkLanceBaseFileFormat(conf, schema);
-    if (isLanceBaseFileFormat(conf) && !OptionsResolver.isAppendMode(conf)) {
-      throw new HoodieValidationException("Flink Lance base-file writes 
require append-only INSERT mode. Set '"
-          + FlinkOptions.OPERATION.key() + "' = 'insert'.");
-    }
+  private void checkBaseFileFormatForWrite(Configuration conf) {

Review Comment:
   🤖 nit: `checkBaseFileFormatForRead` and `checkBaseFileFormatForWrite` are 
now identical one-liner wrappers — could you either merge them into a single 
`checkBaseFileFormat(conf)` (and update the callers), or at least leave a 
comment explaining why separate methods are kept for future divergence? As-is, 
a reader will hunt for differences that don't exist.
   
   <sub><i>- AI-generated; verify before applying. React 👍/👎 to flag 
quality.</i></sub>



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