[Pig Wiki] Update of PigLatin by OlgaN

2008-07-01 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on Pig Wiki for change 
notification.

The following page has been changed by OlgaN:
http://wiki.apache.org/pig/PigLatin

--
 * In the current (1.2) and earlier releases, storage functions are case 
sensitive. This will get changes in the future releases.
 * !PigStorage can only store flat tuples, i.e., tuples having atomic 
fields. If you want to store nested data, use !BinStorage instead.
  
+ [[Anchor(Debugging_Your_Scripts)]]
+ === Debugging Your Scripts ===
+ 
+ Pig provides several ways to assist in building and validating your script.
+ 
+  * `describe` command allows to review schema of a particular relation.
+  * `explain` command shows logical and physical execution plan to compute a 
particular relation.
+  * `illustrate` command shows step-by-step execution of your script on a 
small data sample.
+ 
+ All three commands are described in [http://wiki.apache.org/pig/Grunt Grunt 
Manual].
+ 
  [[Anchor(Working_with_compressed_files)]]
  === Working with Compressed Files ===
  


svn commit: r673198 - in /incubator/pig/branches/types: src/org/apache/pig/ src/org/apache/pig/impl/logicalLayer/ src/org/apache/pig/impl/logicalLayer/parser/ src/org/apache/pig/impl/logicalLayer/vali

2008-07-01 Thread gates
Author: gates
Date: Tue Jul  1 13:33:41 2008
New Revision: 673198

URL: http://svn.apache.org/viewvc?rev=673198view=rev
Log:
Fixed bugs in equal and notequal physical operators that were returning wrong 
results for numeric types.  Added PlanSetter visitor that walks logical plan and
sets all the mPlan values to the final plan the operator is in.


Added:

incubator/pig/branches/types/src/org/apache/pig/impl/logicalLayer/PlanSetter.java
Modified:
incubator/pig/branches/types/src/org/apache/pig/PigServer.java

incubator/pig/branches/types/src/org/apache/pig/impl/logicalLayer/LOCogroup.java

incubator/pig/branches/types/src/org/apache/pig/impl/logicalLayer/LOCross.java

incubator/pig/branches/types/src/org/apache/pig/impl/logicalLayer/LODistinct.java

incubator/pig/branches/types/src/org/apache/pig/impl/logicalLayer/LOFilter.java

incubator/pig/branches/types/src/org/apache/pig/impl/logicalLayer/LOProject.java

incubator/pig/branches/types/src/org/apache/pig/impl/logicalLayer/LOSort.java

incubator/pig/branches/types/src/org/apache/pig/impl/logicalLayer/LOUnion.java

incubator/pig/branches/types/src/org/apache/pig/impl/logicalLayer/LogicalOperator.java

incubator/pig/branches/types/src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt

incubator/pig/branches/types/src/org/apache/pig/impl/logicalLayer/validators/TypeCheckingVisitor.java

incubator/pig/branches/types/src/org/apache/pig/impl/physicalLayer/expressionOperators/EqualToExpr.java

incubator/pig/branches/types/src/org/apache/pig/impl/physicalLayer/expressionOperators/NotEqualToExpr.java
incubator/pig/branches/types/src/org/apache/pig/impl/plan/OperatorPlan.java

incubator/pig/branches/types/test/org/apache/pig/test/TestFilterOpNumeric.java

incubator/pig/branches/types/test/org/apache/pig/test/TestTypeCheckingValidator.java

incubator/pig/branches/types/test/org/apache/pig/test/TestTypeCheckingValidatorNoSchema.java

incubator/pig/branches/types/test/org/apache/pig/test/utils/dotGraph/LogicalPlanLoader.java

Modified: incubator/pig/branches/types/src/org/apache/pig/PigServer.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/branches/types/src/org/apache/pig/PigServer.java?rev=673198r1=673197r2=673198view=diff
==
--- incubator/pig/branches/types/src/org/apache/pig/PigServer.java (original)
+++ incubator/pig/branches/types/src/org/apache/pig/PigServer.java Tue Jul  1 
13:33:41 2008
@@ -50,6 +50,7 @@
 import org.apache.pig.impl.logicalLayer.LogicalPlan;
 import org.apache.pig.impl.logicalLayer.LogicalPlanBuilder;
 import org.apache.pig.impl.logicalLayer.LOPrinter;
+import org.apache.pig.impl.logicalLayer.PlanSetter;
 import org.apache.pig.impl.logicalLayer.optimizer.LogicalOptimizer;
 import org.apache.pig.impl.logicalLayer.parser.ParseException;
 import org.apache.pig.impl.logicalLayer.parser.QueryParser;
@@ -481,6 +482,10 @@
 throw new FrontendException(Cannot operate on null logical plan);
 }
 
+// Set the logical plan values correctly in all the operators
+PlanSetter ps = new PlanSetter(lp);
+ps.visit();
+
 // run through validator
 CompilationMessageCollector collector = new 
CompilationMessageCollector() ;
 FrontendException caught = null;

Modified: 
incubator/pig/branches/types/src/org/apache/pig/impl/logicalLayer/LOCogroup.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/branches/types/src/org/apache/pig/impl/logicalLayer/LOCogroup.java?rev=673198r1=673197r2=673198view=diff
==
--- 
incubator/pig/branches/types/src/org/apache/pig/impl/logicalLayer/LOCogroup.java
 (original)
+++ 
incubator/pig/branches/types/src/org/apache/pig/impl/logicalLayer/LOCogroup.java
 Tue Jul  1 13:33:41 2008
@@ -43,7 +43,6 @@
  * operator. Each generate operator in turn contains a list of expressions
  * for the columns that are projected
  */
-private ArrayListLogicalOperator mInputs;
 private boolean[] mIsInner;
 private static Log log = LogFactory.getLog(LOCogroup.class);
 private MultiMapLogicalOperator, LogicalPlan mGroupByPlans;
@@ -54,22 +53,23 @@
  *LogicalPlan this operator is a part of.
  * @param k
  *OperatorKey for this operator
- * @param inputs
- *List of input operators
  * @param groupByPlans
  *the group by columns
+ * @param isInner
+ *indicates whether the cogroup is inner for each relation
  */
-public LOCogroup(LogicalPlan plan, OperatorKey k,
-ArrayListLogicalOperator inputs,
-MultiMapLogicalOperator, LogicalPlan groupByPlans, boolean[] 
isInner) {
+public LOCogroup(
+LogicalPlan plan,
+OperatorKey k,
+MultiMapLogicalOperator, LogicalPlan