You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@texera.apache.org by yi...@apache.org on 2026/07/29 04:31:02 UTC

(texera) branch backport/6808-register-sklearnlogisticregression-cv-su-v1.2 created (now 4d4b4372c4)

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

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


      at 4d4b4372c4 fix(LogicalOp): register SklearnLogisticRegression(CV) subtypes exactly once (#6808)

This branch includes the following new commits:

     new 4d4b4372c4 fix(LogicalOp): register SklearnLogisticRegression(CV) subtypes exactly once (#6808)

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(texera) 01/01: fix(LogicalOp): register SklearnLogisticRegression(CV) subtypes exactly once (#6808)

Posted by yi...@apache.org.
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 <15...@users.noreply.github.com>
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 <no...@anthropic.com>
---
 .../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"),