hudi-agent commented on code in PR #18862:
URL: https://github.com/apache/hudi/pull/18862#discussion_r3309078228
##########
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: `checkBaseFileFormatForWrite` and `checkBaseFileFormatForRead` are
now identical one-liner wrappers — could you collapse them into a single shared
helper or just inline `checkLanceBaseFileFormat(conf)` at both call sites?
Keeping two separate methods named for read vs. write implies they behave
differently, which could mislead a future contributor into thinking they should
stay independent.
<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]