pig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject svn commit: r1769229 - in /pig/trunk: CHANGES.txt src/org/apache/pig/impl/util/avro/AvroStorageDataConversionUtilities.java
Date Thu, 10 Nov 2016 23:14:52 GMT
Author: daijy
Date: Thu Nov 10 23:14:52 2016
New Revision: 1769229

URL: http://svn.apache.org/viewvc?rev=1769229&view=rev
Log:
PIG-5056: Fix AvroStorage writing enums

Modified:
    pig/trunk/CHANGES.txt
    pig/trunk/src/org/apache/pig/impl/util/avro/AvroStorageDataConversionUtilities.java

Modified: pig/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/pig/trunk/CHANGES.txt?rev=1769229&r1=1769228&r2=1769229&view=diff
==============================================================================
--- pig/trunk/CHANGES.txt (original)
+++ pig/trunk/CHANGES.txt Thu Nov 10 23:14:52 2016
@@ -59,6 +59,8 @@ OPTIMIZATIONS
  
 BUG FIXES
 
+PIG-5056: Fix AvroStorage writing enums (szita via daijy)
+
 PIG-5055: Infinite loop with join by fixed index (knoguchi)
 
 PIG-5049: Cleanup e2e tests turing_jython.conf (Daniel Dai)

Modified: pig/trunk/src/org/apache/pig/impl/util/avro/AvroStorageDataConversionUtilities.java
URL: http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/impl/util/avro/AvroStorageDataConversionUtilities.java?rev=1769229&r1=1769228&r2=1769229&view=diff
==============================================================================
--- pig/trunk/src/org/apache/pig/impl/util/avro/AvroStorageDataConversionUtilities.java (original)
+++ pig/trunk/src/org/apache/pig/impl/util/avro/AvroStorageDataConversionUtilities.java Thu
Nov 10 23:14:52 2016
@@ -118,6 +118,8 @@ public class AvroStorageDataConversionUt
         return ByteBuffer.wrap(((DataByteArray) o).get());
       case FIXED:
         return new GenericData.Fixed(s, ((DataByteArray) o).get());
+      case ENUM:
+        return new GenericData.EnumSymbol(s,o.toString());
       default:
         if (DataType.findType(o) == DataType.DATETIME) {
           return ((DateTime) o).getMillis();



Mime
View raw message