Author: olga Date: Tue Mar 4 18:02:00 2008 New Revision: 633746 URL: http://svn.apache.org/viewvc?rev=633746&view=rev Log: PIG-13 and PIG-118
Modified: incubator/pig/trunk/CHANGES.txt incubator/pig/trunk/build.xml incubator/pig/trunk/src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt Modified: incubator/pig/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/incubator/pig/trunk/CHANGES.txt?rev=633746&r1=633745&r2=633746&view=diff ============================================================================== --- incubator/pig/trunk/CHANGES.txt (original) +++ incubator/pig/trunk/CHANGES.txt Tue Mar 4 18:02:00 2008 @@ -148,6 +148,10 @@ PIG-13: adding version to the system (joa23 via olgan) + PIG-13: make the code use svn only if available (joa23 via olgan) + + PIG-118: make sure union/join/cross takes 2 params (pi_song vi olgan) + PIG-113: Make explain output more understandable (pi_song via gates) PIG-120: Support map reduce in local mode. To do this user needs to Modified: incubator/pig/trunk/build.xml URL: http://svn.apache.org/viewvc/incubator/pig/trunk/build.xml?rev=633746&r1=633745&r2=633746&view=diff ============================================================================== --- incubator/pig/trunk/build.xml (original) +++ incubator/pig/trunk/build.xml Tue Mar 4 18:02:00 2008 @@ -94,13 +94,12 @@ <svnversion outputproperty="svn.revision"/> </target> - <macrodef name="svnversion"> <!-- the path needs to be small content otherwise it will take AGES ! --> <attribute name="wcpath" default="${basedir}" /> <attribute name="outputproperty" /> <sequential> - <exec executable="svnversion" outputproperty="@{outputproperty}" failonerror="true" failifexecutionfails="false"> + <exec executable="svnversion" outputproperty="@{outputproperty}" failonerror="false" failifexecutionfails="false" > <arg value="@{wcpath}" /> <redirector> <outputfilterchain> @@ -111,7 +110,6 @@ </outputfilterchain> </redirector> </exec> - <fail unless="@{outputproperty}" message="Failed to retrieve svn revision. You need 'svnversion' in your path and connectivity to the repository" /> </sequential> </macrodef> @@ -189,6 +187,24 @@ <!-- TODO we should also exculte test here... --> <!-- ================================================================== --> <target name="jar" depends="compile" description="Create pig jar"> + <antcall target="jarWithSvn"/> + <antcall target="jarWithOutSvn"/> + </target> + + <target name="jarWithSvn" if="svn.revision"> + <antcall target="buildJar"> + <param name="svnString" value="${svn.revision}" /> + </antcall> + </target> + + <target name="jarWithOutSvn" unless="svn.revision"> + <antcall target="buildJar"> + <param name="svnString" value=": unknown" /> + </antcall> + </target> + + <target name="buildJar"> + <echo>svnString ${svnString}</echo> <jar jarfile="${output.jarfile.core}" basedir="${build.classes}"> <manifest> <attribute name="Main-Class" value="org.apache.pig.Main" /> @@ -197,7 +213,7 @@ <attribute name="Implementation-Title" value="Pig" /> <attribute name="Implementation-Version" value="${version}" /> <attribute name="Build-TimeStamp" value="${timestamp}" /> - <attribute name="Svn-Revision" value="${svn.revision}" /> + <attribute name="Svn-Revision" value="${svnString}" /> </section> </manifest> </jar> @@ -210,7 +226,7 @@ <attribute name="Implementation-Title" value="Pig" /> <attribute name="Implementation-Version" value="${version}" /> <attribute name="Build-TimeStamp" value="${timestamp}" /> - <attribute name="Svn-Revision" value="${svn.revision}" /> + <attribute name="Svn-Revision" value="${svnString}" /> </section> </manifest> <zipfileset src="${lib.dir}/junit-4.1.jar" /> Modified: incubator/pig/trunk/src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt URL: http://svn.apache.org/viewvc/incubator/pig/trunk/src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt?rev=633746&r1=633745&r2=633746&view=diff ============================================================================== --- incubator/pig/trunk/src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt (original) +++ incubator/pig/trunk/src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt Tue Mar 4 18:02:00 2008 @@ -605,7 +605,7 @@ { ( op = NestedExpr() { inputs.add(op.getOperatorKey()); } - ("," op = NestedExpr() { inputs.add(op.getOperatorKey()); })* + ("," op = NestedExpr() { inputs.add(op.getOperatorKey()); })+ ) {return rewriteCross(inputs);} } @@ -613,14 +613,14 @@ LogicalOperator JoinClause() : {CogroupInput gi; ArrayList<CogroupInput> gis = new ArrayList<CogroupInput>();} { (gi = GroupItem() { gis.add(gi); } - ("," gi = GroupItem() { gis.add(gi); })*) + ("," gi = GroupItem() { gis.add(gi); })+) {return rewriteJoin(gis);} } LogicalOperator UnionClause() : {LogicalOperator op; ArrayList<OperatorKey> inputs = new ArrayList<OperatorKey>();} { (op = NestedExpr() { inputs.add(op.getOperatorKey()); } - ("," op = NestedExpr() { inputs.add(op.getOperatorKey()); })*) + ("," op = NestedExpr() { inputs.add(op.getOperatorKey()); })+) {return new LOUnion(opTable, scope, getNextId(), inputs);} }