You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Xiangrui Meng (JIRA)" <ji...@apache.org> on 2016/06/20 21:19:58 UTC

[jira] [Updated] (SPARK-16075) Make VectorUDT/MatrixUDT singleton under spark.ml package

     [ https://issues.apache.org/jira/browse/SPARK-16075?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xiangrui Meng updated SPARK-16075:
----------------------------------
    Description: 
Both VectorUDT and MatrixUDT are implemented as normal classes and their could be multiple instances of it, which makes the equality checking and pattern matching harder to implement. Even the APIs are private, switching to a singleton pattern could simplify the development.

Required changes:
* singleton VectorUDT/MatrixUDT (created by VectorUDT.getOrCreate)
* update UDTRegistration
* update code generation to support singleton UDTs
* update existing code to use getOrCreate

  was:
Both VectorUDT and MatrixUDT are implemented as normal classes and their could be multiple instances of it, which makes the equality checking and pattern matching harder to implement. Even the APIs are private, switching to a singleton pattern could simplify the development.

Required changes:
* singleton VectorUDT/MatrixUDT
* add UDTFactory trait with getOrCreate to return the singleton instance
* update UDTRegistration
* update code generation to support UDTFactory


> Make VectorUDT/MatrixUDT singleton under spark.ml package
> ---------------------------------------------------------
>
>                 Key: SPARK-16075
>                 URL: https://issues.apache.org/jira/browse/SPARK-16075
>             Project: Spark
>          Issue Type: Improvement
>          Components: MLlib
>    Affects Versions: 2.0.0
>            Reporter: Xiangrui Meng
>            Assignee: Xiangrui Meng
>
> Both VectorUDT and MatrixUDT are implemented as normal classes and their could be multiple instances of it, which makes the equality checking and pattern matching harder to implement. Even the APIs are private, switching to a singleton pattern could simplify the development.
> Required changes:
> * singleton VectorUDT/MatrixUDT (created by VectorUDT.getOrCreate)
> * update UDTRegistration
> * update code generation to support singleton UDTs
> * update existing code to use getOrCreate



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org