You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Chinmay Kulkarni (JIRA)" <ji...@apache.org> on 2019/08/07 05:43:00 UTC

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

Chinmay Kulkarni created PHOENIX-5432:
-----------------------------------------

             Summary: 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


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
(v7.6.14#76016)