title: Apache Pig's explain-function
body: <p>I'm trying to understand Pig's <code>explain</code>-function (<a href="http://pig.apache.org/docs/r0.14.0/test.html#explain" rel="nofollow">link</a>).</p>
  
  <p>Suppose the following example:</p>
  
  <pre><code>A = load 'numbers' using PigStorage(',') as (name, age);
  explain A;
  </code></pre>
  
  <p>Which gives me:</p>
  
  <pre><code>#-----------------------------------------------
  # New Logical Plan:
  #-----------------------------------------------
  A: (Name: LOStore Schema: name#5:bytearray,age#6:bytearray)
  |
  |---A: (Name: LOLoad Schema: name#5:bytearray,age#6:bytearray)RequiredFields:[0, 1]
  #-----------------------------------------------
  # Physical Plan:
  #-----------------------------------------------
  A: Store(fakefile:org.apache.pig.builtin.PigStorage) - scope-1
  |
  |---A: Load(file:///...pig-0.14.0/numbers:PigStorage(',')) - scope-0
  
  2014-12-07 15:07:10,596 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MRCompiler - File concatenation threshold: 100 optimistic? false
  2014-12-07 15:07:10,609 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MultiQueryOptimizer - MR plan size before optimization: 1
  2014-12-07 15:07:10,610 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MultiQueryOptimizer - MR plan size after optimization: 1
  #--------------------------------------------------
  # Map Reduce Plan                                  
  #--------------------------------------------------
  MapReduce node scope-2
  Map Plan
  A: Store(fakefile:org.apache.pig.builtin.PigStorage) - scope-1
  |
  |---A: Load(file:///.../pig-0.14.0/numbers:PigStorage(',')) - scope-0--------
  Global sort: false
  ----------------
  </code></pre>
  
  <p>What can I see here? I find the output rather confusing.</p>