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

ASF GitHub Bot commented on TAJO-2154:
--------------------------------------

Github user hyunsik commented on a diff in the pull request:

    https://github.com/apache/tajo/pull/1017#discussion_r63986923
  
    --- Diff: tajo-common/src/main/java/org/apache/tajo/type/Type.java ---
    @@ -36,6 +36,7 @@
     
       // No paramter types
       public static final Any Any = new Any();
    +  public static final Bit Bit = new Bit();
    --- End diff --
    
    IMO, the main difference between singleton with (typical) ``getInstance`` 
method and ```static final``` variable is the initialization time. Singleton 
pattern is preferred if the variable needs to be initialized lazily. Static 
variable is initialized at class loading. In this case, they are always used 
throughout a system. So, IMO, static variable is also right choice here. In 
addition, static variable provides more concise usages.


> Refactor Datum to use new Type implementation
> ---------------------------------------------
>
>                 Key: TAJO-2154
>                 URL: https://issues.apache.org/jira/browse/TAJO-2154
>             Project: Tajo
>          Issue Type: Task
>          Components: Data Type
>            Reporter: Hyunsik Choi
>            Assignee: Hyunsik Choi
>             Fix For: 0.12.0
>
>
> See TAJO-2042. The main objective of this issue is to refactor all Datum 
> implementation to use new Type implementation.



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

Reply via email to