You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Christine Feng (Jira)" <ji...@apache.org> on 2019/10/31 00:18:00 UTC

[jira] [Updated] (PHOENIX-5432) Refactor LiteralExpression to use the builder pattern

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

Christine Feng updated PHOENIX-5432:
------------------------------------
    Attachment: PHOENIX-5432.patch

> Refactor LiteralExpression to use the builder pattern
> -----------------------------------------------------
>
>                 Key: PHOENIX-5432
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5432
>             Project: Phoenix
>          Issue Type: Improvement
>    Affects Versions: 4.15.0, 5.1.0
>            Reporter: Chinmay Kulkarni
>            Priority: Major
>         Attachments: PHOENIX-5432.patch
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> LiteralExpression is a mess. While it provides newConstant() APIs to build the object, it also provides two public constructors. There are 10 overloaded newConstant() methods and it is unclear which API to use in which case.
> This should be refactored to use the builder pattern and final member variables. Ideally, getters such as getMaxLength() should be simple member variable accessors and other ad-hoc logic surrounding those variables should be handled correctly when setting their respective values.
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)