You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by da...@apache.org on 2011/12/19 02:40:09 UTC

svn commit: r1220588 - in /pig/trunk: src/org/apache/pig/parser/AstPrinter.g test/org/apache/pig/test/TestEvalFuncOutputAnnotation.java test/org/apache/pig/test/data/jsonStorage1.schema

Author: daijy
Date: Mon Dec 19 01:40:09 2011
New Revision: 1220588

URL: http://svn.apache.org/viewvc?rev=1220588&view=rev
Log:
Fix unit test failure caused by PIG-2427

Modified:
    pig/trunk/src/org/apache/pig/parser/AstPrinter.g
    pig/trunk/test/org/apache/pig/test/TestEvalFuncOutputAnnotation.java
    pig/trunk/test/org/apache/pig/test/data/jsonStorage1.schema

Modified: pig/trunk/src/org/apache/pig/parser/AstPrinter.g
URL: http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/parser/AstPrinter.g?rev=1220588&r1=1220587&r2=1220588&view=diff
==============================================================================
--- pig/trunk/src/org/apache/pig/parser/AstPrinter.g (original)
+++ pig/trunk/src/org/apache/pig/parser/AstPrinter.g Mon Dec 19 01:40:09 2011
@@ -176,7 +176,7 @@ tuple_type 
 ;
 
 bag_type 
-    : ^( BAG_TYPE { sb.append("bag{"); } ( { sb.append("T:"); } tuple_type )? ) { sb.append("}"); } 
+    : ^( BAG_TYPE { sb.append("bag{"); } ( { sb.append("T:"); } IDENTIFIER? tuple_type )? ) { sb.append("}"); } 
 ;
 
 map_type : ^( MAP_TYPE { sb.append("map["); } type? ) { sb.append("]"); }

Modified: pig/trunk/test/org/apache/pig/test/TestEvalFuncOutputAnnotation.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestEvalFuncOutputAnnotation.java?rev=1220588&r1=1220587&r2=1220588&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/TestEvalFuncOutputAnnotation.java (original)
+++ pig/trunk/test/org/apache/pig/test/TestEvalFuncOutputAnnotation.java Mon Dec 19 01:40:09 2011
@@ -56,7 +56,7 @@ public class TestEvalFuncOutputAnnotatio
     }
 
     // This would give the same result: "y:bag{tuple(len:int,word:chararray)}"
-    @OutputSchema("y:bag{t:tuple(len:int,word:chararray)}")
+    @OutputSchema("y:bag{(len:int,word:chararray)}")
     public static class ComplexFunc extends EvalFunc<DataBag> {
         @Override
         public DataBag exec(Tuple input) throws IOException {

Modified: pig/trunk/test/org/apache/pig/test/data/jsonStorage1.schema
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/data/jsonStorage1.schema?rev=1220588&r1=1220587&r2=1220588&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/data/jsonStorage1.schema (original)
+++ pig/trunk/test/org/apache/pig/test/data/jsonStorage1.schema Mon Dec 19 01:40:09 2011
@@ -1 +1 @@
-{"fields":[{"name":"a0","type":10,"description":"autogenerated from Pig Field Schema","schema":null},{"name":"a1","type":120,"description":"autogenerated from Pig Field Schema","schema":{"fields":[{"name":null,"type":110,"description":"autogenerated from Pig Field Schema","schema":{"fields":[{"name":"a10","type":10,"description":"autogenerated from Pig Field Schema","schema":null},{"name":"a11","type":55,"description":"autogenerated from Pig Field Schema","schema":null}],"version":0,"sortKeys":[],"sortKeyOrders":[]}}],"version":0,"sortKeys":[],"sortKeyOrders":[]}},{"name":"a2","type":110,"description":"autogenerated from Pig Field Schema","schema":{"fields":[{"name":"a20","type":25,"description":"autogenerated from Pig Field Schema","schema":null},{"name":"a21","type":50,"description":"autogenerated from Pig Field Schema","schema":null}],"version":0,"sortKeys":[],"sortKeyOrders":[]}},{"name":"a3","type":100,"description":"autogenerated from Pig Field Schema","schema":{"field
 s":[{"name":null,"type":55,"description":"autogenerated from Pig Field Schema","schema":null}],"version":0,"sortKeys":[],"sortKeyOrders":[]}}],"version":0,"sortKeys":[],"sortKeyOrders":[]}
+{"fields":[{"name":"a0","type":10,"description":"autogenerated from Pig Field Schema","schema":null},{"name":"a1","type":120,"description":"autogenerated from Pig Field Schema","schema":{"fields":[{"name":"t","type":110,"description":"autogenerated from Pig Field Schema","schema":{"fields":[{"name":"a10","type":10,"description":"autogenerated from Pig Field Schema","schema":null},{"name":"a11","type":55,"description":"autogenerated from Pig Field Schema","schema":null}],"version":0,"sortKeys":[],"sortKeyOrders":[]}}],"version":0,"sortKeys":[],"sortKeyOrders":[]}},{"name":"a2","type":110,"description":"autogenerated from Pig Field Schema","schema":{"fields":[{"name":"a20","type":25,"description":"autogenerated from Pig Field Schema","schema":null},{"name":"a21","type":50,"description":"autogenerated from Pig Field Schema","schema":null}],"version":0,"sortKeys":[],"sortKeyOrders":[]}},{"name":"a3","type":100,"description":"autogenerated from Pig Field Schema","schema":{"fields
 ":[{"name":null,"type":55,"description":"autogenerated from Pig Field Schema","schema":null}],"version":0,"sortKeys":[],"sortKeyOrders":[]}}],"version":0,"sortKeys":[],"sortKeyOrders":[]}