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
1.3.0-incubating-SNAPSHOT (main)
Commit Hash (Optional)
No response
What browsers are you seeing the problem on?
No response
Relevant log output
What happened?
In
LogicalOp's@JsonSubTypes, bothSklearnLogisticRegressionOpDescandSklearnLogisticRegressionCVOpDescare registered twice:common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/LogicalOp.scalaBoth pairs are active
new Type(...)entries (not commented out). The twooperators therefore appear twice in the subtype registry. Any consumer that
enumerates
@JsonSubTypes.value()(operator discovery, metadata/schemageneration, 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@JsonSubTypeslist:shows
SklearnLogisticRegressionandSklearnLogisticRegressionCVeach at twoseparate
new Type(...)lines (276/278 and 355/357).Proposed fix: remove the duplicate pair, keeping exactly one registration of
each:
Version/Branch
1.3.0-incubating-SNAPSHOT (main)
Commit Hash (Optional)
No response
What browsers are you seeing the problem on?
No response
Relevant log output