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

    https://github.com/apache/phoenix/pull/85#discussion_r31263954
  
    --- Diff: 
phoenix-pig/src/main/java/org/apache/phoenix/pig/util/TypeUtil.java ---
    @@ -68,258 +67,250 @@
     import com.google.common.collect.ImmutableMap.Builder;
     
     public final class TypeUtil {
    -   
    +
         private static final Log LOG = LogFactory.getLog(TypeUtil.class);
    -    private static final HBaseBinaryConverter binaryConverter = new 
HBaseBinaryConverter ();
    -   private static final ImmutableMap<PDataType,Byte> 
phoenixTypeToPigDataType = init();
    -   
    -   private TypeUtil(){
    -   }
    -   
    -   /**
    -    * A map of Phoenix to Pig data types.
    -    * @return
    -    */
    -   private static ImmutableMap<PDataType, Byte> init() {
    -        final ImmutableMap.Builder<PDataType,Byte> builder = new 
Builder<PDataType,Byte> ();
    -        builder.put(PLong.INSTANCE,DataType.LONG);
    -        builder.put(PVarbinary.INSTANCE,DataType.BYTEARRAY);
    -        builder.put(PChar.INSTANCE,DataType.CHARARRAY);
    -        builder.put(PVarchar.INSTANCE,DataType.CHARARRAY);
    -        builder.put(PDouble.INSTANCE,DataType.DOUBLE);
    -        builder.put(PFloat.INSTANCE,DataType.FLOAT);
    -        builder.put(PInteger.INSTANCE,DataType.INTEGER);
    -        builder.put(PTinyint.INSTANCE,DataType.INTEGER);
    -        builder.put(PSmallint.INSTANCE,DataType.INTEGER);
    -        builder.put(PDecimal.INSTANCE,DataType.BIGDECIMAL);
    -        builder.put(PTime.INSTANCE,DataType.DATETIME);
    -        builder.put(PTimestamp.INSTANCE,DataType.DATETIME);
    -        builder.put(PBoolean.INSTANCE,DataType.BOOLEAN);
    -        builder.put(PDate.INSTANCE,DataType.DATETIME);
    -        builder.put(PUnsignedDate.INSTANCE,DataType.DATETIME);
    -        builder.put(PUnsignedDouble.INSTANCE,DataType.DOUBLE);
    -        builder.put(PUnsignedFloat.INSTANCE,DataType.FLOAT);
    -        builder.put(PUnsignedInt.INSTANCE,DataType.INTEGER);
    -        builder.put(PUnsignedLong.INSTANCE,DataType.LONG);
    -        builder.put(PUnsignedSmallint.INSTANCE,DataType.INTEGER);
    -        builder.put(PUnsignedTime.INSTANCE,DataType.DATETIME);
    -        builder.put(PUnsignedTimestamp.INSTANCE,DataType.DATETIME);
    -        builder.put(PUnsignedTinyint.INSTANCE,DataType.INTEGER);
    +    private static final HBaseBinaryConverter BINARY_CONVERTER = new 
HBaseBinaryConverter();
    +    private static final ImmutableMap<PDataType, Byte> PHOENIX_TO_PIG_TYPE 
= init();
    +    private static final TupleFactory TUPLE_FACTORY = 
TupleFactory.getInstance();
    +
    +    private TypeUtil() {}
    +
    +    /**
    +     * A map of Phoenix to Pig data types.
    +     * 
    +     * @return
    --- End diff --
    
    nit: if you are going to change this, at least move around the javadoc so 
it reads: "@return map of Phoenix to Pig data types."


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