This is an automated email from the ASF dual-hosted git repository.

Yicong-Huang pushed a commit to branch 
backport/6808-register-sklearnlogisticregression-cv-su-v1.2
in repository https://gitbox.apache.org/repos/asf/texera.git

commit 4d4b4372c4710d4c66e446392be712cc5eea4178
Author: Kary Zheng <[email protected]>
AuthorDate: Wed Jul 29 00:30:56 2026 -0400

    fix(LogicalOp): register SklearnLogisticRegression(CV) subtypes exactly 
once (#6808)
    
    ### What changes were proposed in this PR?
    
    `LogicalOp`'s `@JsonSubTypes` registered
    `SklearnLogisticRegressionOpDesc` and
    `SklearnLogisticRegressionCVOpDesc` **twice each** (two separate active
    `new Type(...)` pairs). Any consumer that enumerates
    `@JsonSubTypes.value()` — operator discovery, metadata/schema
    generation, the operator palette — therefore saw each of these two
    operators twice.
    
    This PR removes the duplicate pair, keeping exactly one registration of
    each:
    
    ```diff
    -    new Type(value = classOf[SklearnLogisticRegressionOpDesc], name = 
"SklearnLogisticRegression"),
    -    new Type(
    -      value = classOf[SklearnLogisticRegressionCVOpDesc],
    -      name = "SklearnLogisticRegressionCV"
    -    ),
    ```
    
    ### Any related issues, documentation, discussions?
    
    Closes #6793
    
    ### How was this PR tested?
    
    Added a `LogicalOpSpec` regression test that reads the `@JsonSubTypes`
    annotation and asserts no subtype **class** or **name** is registered
    more than once. Verified the test **fails** on the pre-fix (duplicated)
    registry and **passes** after the fix; full `LogicalOpSpec` is green
    (5/5).
    
    ### Was this PR authored or co-authored using generative AI tooling?
    
    Generated-by: Claude Code (Claude Opus 4.8)
    
    ---------
    
    (backported from commit e81ba0ea478b131a88335dbbeadfb0229ff008ed)
    
    Co-authored-by: Claude Opus 4.8 <[email protected]>
---
 .../src/main/scala/org/apache/texera/amber/operator/LogicalOp.scala  | 5 -----
 1 file changed, 5 deletions(-)

diff --git 
a/common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/LogicalOp.scala
 
b/common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/LogicalOp.scala
index 4e9d6c6e2c..65541a535a 100644
--- 
a/common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/LogicalOp.scala
+++ 
b/common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/LogicalOp.scala
@@ -351,11 +351,6 @@ trait StateTransferFunc
       value = classOf[SklearnTrainingLogisticRegressionCVOpDesc],
       name = "SklearnTrainingLogisticRegressionCV"
     ),
-    new Type(value = classOf[SklearnLogisticRegressionOpDesc], name = 
"SklearnLogisticRegression"),
-    new Type(
-      value = classOf[SklearnLogisticRegressionCVOpDesc],
-      name = "SklearnLogisticRegressionCV"
-    ),
     new Type(value = classOf[SklearnRidgeOpDesc], name = "SklearnRidge"),
     new Type(value = classOf[SklearnRidgeCVOpDesc], name = "SklearnRidgeCV"),
     new Type(value = classOf[SklearnSDGOpDesc], name = "SklearnSDG"),

Reply via email to