avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r1097916 - in /avro/trunk: CHANGES.txt lang/java/avro/src/main/java/org/apache/avro/io/parsing/Symbol.java lang/java/avro/src/test/java/org/apache/avro/io/TestResolvingIOResolving.java
Date Fri, 29 Apr 2011 19:05:20 GMT
Author: cutting
Date: Fri Apr 29 19:05:20 2011
New Revision: 1097916

URL: http://svn.apache.org/viewvc?rev=1097916&view=rev
Log:
AVRO-793. Java: Fix a bug in the resolver when skipping an array within a record.  Contributed
by thiru.

Modified:
    avro/trunk/CHANGES.txt
    avro/trunk/lang/java/avro/src/main/java/org/apache/avro/io/parsing/Symbol.java
    avro/trunk/lang/java/avro/src/test/java/org/apache/avro/io/TestResolvingIOResolving.java

Modified: avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/avro/trunk/CHANGES.txt?rev=1097916&r1=1097915&r2=1097916&view=diff
==============================================================================
--- avro/trunk/CHANGES.txt (original)
+++ avro/trunk/CHANGES.txt Fri Apr 29 19:05:20 2011
@@ -75,6 +75,9 @@ Avro 1.5.1 (unreleased)
     AVRO-801. Java: Fix a bug in SaslSocketTransceiver where large
     messages were truncated on write. (cutting)
 
+    AVRO-793. Java: Fix a bug in the resolver when skipping an array
+    within a record. (thiru via cutting)
+
 Avro 1.5.0 (10 March 2011)
 
   INCOMPATIBLE CHANGES

Modified: avro/trunk/lang/java/avro/src/main/java/org/apache/avro/io/parsing/Symbol.java
URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/avro/src/main/java/org/apache/avro/io/parsing/Symbol.java?rev=1097916&r1=1097915&r2=1097916&view=diff
==============================================================================
--- avro/trunk/lang/java/avro/src/main/java/org/apache/avro/io/parsing/Symbol.java (original)
+++ avro/trunk/lang/java/avro/src/main/java/org/apache/avro/io/parsing/Symbol.java Fri Apr
29 19:05:20 2011
@@ -440,6 +440,7 @@ public abstract class Symbol {
   public static class SkipAction extends ImplicitAction {
     public final Symbol symToSkip;
     public SkipAction(Symbol symToSkip) {
+      super(true);
       this.symToSkip = symToSkip;
     }
     

Modified: avro/trunk/lang/java/avro/src/test/java/org/apache/avro/io/TestResolvingIOResolving.java
URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/avro/src/test/java/org/apache/avro/io/TestResolvingIOResolving.java?rev=1097916&r1=1097915&r2=1097916&view=diff
==============================================================================
--- avro/trunk/lang/java/avro/src/test/java/org/apache/avro/io/TestResolvingIOResolving.java
(original)
+++ avro/trunk/lang/java/avro/src/test/java/org/apache/avro/io/TestResolvingIOResolving.java
Fri Apr 29 19:05:20 2011
@@ -188,6 +188,18 @@ public class TestResolvingIOResolving {
           + "{\"name\":\"f1\", \"type\":\"long\"},"
           + "{\"name\":\"f3\", \"type\":\"double\"}]}", "BLD",
           new Object[] { true, 100L, 10.75d } },
+        // Array of record with arrays.
+        { "{ \"type\": \"array\", \"items\":" +
+        		"{\"type\":\"record\",\"name\":\"r\",\"fields\":["
+            + "{\"name\":\"f0\", \"type\":\"boolean\"},"
+            + "{\"name\":\"f1\", \"type\": {\"type\":\"array\", \"items\": \"boolean\" }}"
+            + "]}}", "[c2sB[c2sBsB]sB[c3sBsBsB]]",
+            new Object[] { true, false, false, false, true, true, true },
+            "{ \"type\": \"array\", \"items\":" +
+            "{\"type\":\"record\",\"name\":\"r\",\"fields\":["
+            + "{\"name\":\"f0\", \"type\":\"boolean\"}"
+            + "]}}", "[c2sBsB]",
+            new Object[] { true, false } },
     };
   }
 }



Mime
View raw message