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.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to