[
https://issues.apache.org/jira/browse/PHOENIX-1981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14563430#comment-14563430
]
ASF GitHub Bot commented on PHOENIX-1981:
-----------------------------------------
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."
> PhoenixHBase Load and Store Funcs should handle all Pig data types
> ------------------------------------------------------------------
>
> Key: PHOENIX-1981
> URL: https://issues.apache.org/jira/browse/PHOENIX-1981
> Project: Phoenix
> Issue Type: Improvement
> Reporter: Prashant Kommireddi
> Assignee: Prashant Kommireddi
>
> The load and store func (Pig integration) currently do not handle all Pig
> types. Here is a complete list
> http://pig.apache.org/docs/r0.13.0/basic.html#data-types
> In addition to handling all simple types (BigInteger and BigDecimal are
> missing in the LoadFunc currently), we should also look into handling complex
> Pig types.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)