rangareddy commented on issue #16655:
URL: https://github.com/apache/hudi/issues/16655#issuecomment-5434694549

   This issue was reviewed as part of the JIRA-migrated backlog triage 
(HUDI-8305).
   
   **Findings: confirmed on `master`, and it is more than a tidiness issue.**
   
   In 
`hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieWriteConfig.java`:
   
   ```java
   :1044  private final EngineType engineType;
   ...
   :1403    this.engineType = EngineType.SPARK;      // constructor that takes 
no engineType
   :1407  protected HoodieWriteConfig(EngineType engineType, Properties props)  
 // explicit constructor
   ```
   
   So both paths coexist, and a config built through the first silently claims 
to be Spark regardless of the actual engine.
   
   That has real consequences rather than just being untidy: `engineType` feeds 
actual decisions - for example `:1453` passes it into record-merger resolution 
- so a Flink or Java caller that ends up on the defaulting constructor gets 
Spark-flavoured behaviour with no error raised.
   
   Your proposed fix (require it, no default) is the right shape. The one thing 
to check first is whether any caller outside this repo depends on the no-arg 
path, since `HoodieWriteConfig` is client-facing - that determines whether this 
needs a deprecation cycle or can be a straight removal.
   


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