kz930 opened a new issue, #6793: URL: https://github.com/apache/texera/issues/6793
### What happened? In `LogicalOp`'s `@JsonSubTypes`, both `SklearnLogisticRegressionOpDesc` and `SklearnLogisticRegressionCVOpDesc` are registered **twice**: `common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/LogicalOp.scala` ``` line 276: new Type(value = classOf[SklearnLogisticRegressionOpDesc], name = "SklearnLogisticRegression"), line 278: new Type(value = classOf[SklearnLogisticRegressionCVOpDesc], name = "SklearnLogisticRegressionCV"), ... line 355: new Type(value = classOf[SklearnLogisticRegressionOpDesc], name = "SklearnLogisticRegression"), line 357: new Type(value = classOf[SklearnLogisticRegressionCVOpDesc], name = "SklearnLogisticRegressionCV"), ``` Both pairs are active `new Type(...)` entries (not commented out). The two operators therefore appear twice in the subtype registry. Any consumer that enumerates `@JsonSubTypes.value()` (operator discovery, metadata/schema generation, the operator palette) sees each of them twice, and duplicate subtype registration is redundant and error-prone in general. **Expected:** each operator is registered exactly once. ### How to reproduce? Inspect `LogicalOp`'s `@JsonSubTypes` list: ``` git show HEAD:common/.../operator/LogicalOp.scala | grep -n SklearnLogisticRegression ``` shows `SklearnLogisticRegression` and `SklearnLogisticRegressionCV` each at two separate `new Type(...)` lines (276/278 and 355/357). **Proposed fix:** remove the duplicate pair, keeping exactly one registration of each: ``` - new Type(value = classOf[SklearnLogisticRegressionOpDesc], name = "SklearnLogisticRegression"), - new Type( - value = classOf[SklearnLogisticRegressionCVOpDesc], - name = "SklearnLogisticRegressionCV" - ), ``` ### Version/Branch `main` (1.3.0-incubating-SNAPSHOT) -- 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]
