You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by ol...@apache.org on 2009/05/29 00:24:25 UTC
svn commit: r779786 - in /hadoop/pig/trunk: CHANGES.txt
src/org/apache/pig/tools/pigscript/parser/PigScriptParser.jj
test/org/apache/pig/test/TestGrunt.java
Author: olga
Date: Thu May 28 22:24:24 2009
New Revision: 779786
URL: http://svn.apache.org/viewvc?rev=779786&view=rev
Log:
PIG-819: run -param -param; is a valid grunt command (milindb via olgan)
Modified:
hadoop/pig/trunk/CHANGES.txt
hadoop/pig/trunk/src/org/apache/pig/tools/pigscript/parser/PigScriptParser.jj
hadoop/pig/trunk/test/org/apache/pig/test/TestGrunt.java
Modified: hadoop/pig/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/pig/trunk/CHANGES.txt?rev=779786&r1=779785&r2=779786&view=diff
==============================================================================
--- hadoop/pig/trunk/CHANGES.txt (original)
+++ hadoop/pig/trunk/CHANGES.txt Thu May 28 22:24:24 2009
@@ -48,6 +48,8 @@
BUG FIXES
+PIG-819: run -param -param; is a valid grunt command (milindb via olgan)
+
PIG-656: Use of eval or any other keyword in the package hierarchy of a UDF causes
parse exception (milindb via sms)
Modified: hadoop/pig/trunk/src/org/apache/pig/tools/pigscript/parser/PigScriptParser.jj
URL: http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/tools/pigscript/parser/PigScriptParser.jj?rev=779786&r1=779785&r2=779786&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/tools/pigscript/parser/PigScriptParser.jj (original)
+++ hadoop/pig/trunk/src/org/apache/pig/tools/pigscript/parser/PigScriptParser.jj Thu May 28 22:24:24 2009
@@ -661,18 +661,6 @@
t = <RUN>
|
t = <EXEC>
- |
- t = <OUT>
- |
- t = <SCRIPT>
- |
- t = <DOT>
- |
- t = <BRIEF>
- |
- t = <PARAM>
- |
- t = <PARAM_FILE>
)
{return t;}
Modified: hadoop/pig/trunk/test/org/apache/pig/test/TestGrunt.java
URL: http://svn.apache.org/viewvc/hadoop/pig/trunk/test/org/apache/pig/test/TestGrunt.java?rev=779786&r1=779785&r2=779786&view=diff
==============================================================================
--- hadoop/pig/trunk/test/org/apache/pig/test/TestGrunt.java (original)
+++ hadoop/pig/trunk/test/org/apache/pig/test/TestGrunt.java Thu May 28 22:24:24 2009
@@ -28,6 +28,7 @@
import org.apache.pig.PigServer;
import org.apache.pig.impl.PigContext;
import org.apache.pig.tools.grunt.Grunt;
+import org.apache.pig.tools.pigscript.parser.ParseException;
import org.apache.pig.impl.util.LogUtils;
import java.io.ByteArrayInputStream;
@@ -652,6 +653,29 @@
}
@Test
+ public void testInvalidParam() throws Throwable {
+ PigServer server = new PigServer(ExecType.LOCAL, cluster.getProperties());
+ PigContext context = server.getPigContext();
+
+ String strCmd =
+ "run -param -param;";
+
+ ByteArrayInputStream cmd = new ByteArrayInputStream(strCmd.getBytes());
+ InputStreamReader reader = new InputStreamReader(cmd);
+
+ Grunt grunt = new Grunt(new BufferedReader(reader), context);
+
+ boolean caught = false;
+ try {
+ grunt.exec();
+ } catch (ParseException e) {
+ caught = true;
+ assertTrue(e.getMessage().contains("Encountered"));
+ }
+ assertTrue(caught);
+ }
+
+ @Test
public void testStopOnFailure() throws Throwable {
PigServer server = new PigServer(ExecType.MAPREDUCE, cluster.getProperties());
PigContext context = server.getPigContext();