[ 
https://issues.apache.org/jira/browse/PHOENIX-4996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16672772#comment-16672772
 ] 

ASF GitHub Bot commented on PHOENIX-4996:
-----------------------------------------

Github user ChinmaySKulkarni commented on the issue:

    https://github.com/apache/phoenix/pull/401
  
    - Removed the override props map
    - Now using `builderWithColumns` which calls `builderFromExisting` instead
    of the earlier `makePTableFromExisting`
    - Renamed `init` to `initDerivedAttributes`
    - `initDerivedAttributes` is called from the `build` method when columns are
    set in the builder.
    
    Overall, now all places use only setters/`builderWithColumns` and directly 
call `build` without having to explicitly call `init` or any such equivalent 
method. Let me know what you guys think @twdsilva @vincentpoon 


> Refactor PTableImpl to use Builder Pattern
> ------------------------------------------
>
>                 Key: PHOENIX-4996
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4996
>             Project: Phoenix
>          Issue Type: Improvement
>            Reporter: Chinmay Kulkarni
>            Assignee: Chinmay Kulkarni
>            Priority: Major
>         Attachments: PHOENIX-4996.patch
>
>
> Currently _PTableImpl_ has many constructor parameters, overloaded 
> constructors as well as overloaded versions of _makePTable_ which basically 
> creates a new PTable itself. Because of this, constructing new PTable 
> instances is becoming very difficult and error-prone. We should refactor this 
> to use the builder pattern. This will improve usability and readability of 
> the code at the cost of some amount of code repetition due to limitations of 
> the builder pattern itself.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to