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

    https://github.com/apache/incubator-hawq/pull/873#discussion_r77723697
  
    --- Diff: 
pxf/pxf-hive/src/main/java/org/apache/hawq/pxf/plugins/hive/utilities/EnumHiveToHawqType.java
 ---
    @@ -110,4 +122,68 @@ public static EnumHiveToHawqType 
getHiveToHawqType(String hiveType) {
                     + hiveType + " to HAWQ's type");
         }
     
    +
    +    /**
    +     * 
    +     * @param dataType Hawq data type
    +     * @return compatible Hive type to given Hawq type, if there are more 
than one compatible types, it returns one with bigger size
    +     * @throws UnsupportedTypeException if there is no corresponding Hive 
type for given Hawq type
    +     */
    +    public static EnumHiveToHawqType getCompatibleHawqToHiveType(DataType 
dataType) {
    +
    +        SortedSet<EnumHiveToHawqType> types = new 
TreeSet<EnumHiveToHawqType>(
    +                new Comparator<EnumHiveToHawqType>() {
    +                    public int compare(EnumHiveToHawqType a,
    +                            EnumHiveToHawqType b) {
    +                        return Byte.compare(a.getSize(), b.getSize());
    +                    }
    +                });
    --- End diff --
    
    It's actually being populated based on dataType argument.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to