title: Apache-PIG script: ERROR Invalid field projection on joined variable
body: <p>The Pig script I have created works, unless I try to use <code>GENERATE</code> on the field that I joined on. </p>
  
  <pre><code>cc_data = LOAD 'default.complaint1' USING org.apache.hive.hcatalog.pig.HCatLoader(); 
  cc2_data = LOAD 'default.complaint2' USING org.apache.hive.hcatalog.pig.HCatLoader(); 
  combined = join cc_data by complaintid, cc2_data by complaintid;
  </code></pre>
  
  <p>If I do a <code>DESCRIBE</code> on my combined it shows as follows: </p>
  
  <p>combined:</p>
  
  <pre><code>{cc_data::daterecieved: chararray,
   cc_data::product: chararray,
   cc_data::subproduct: chararray,
   cc_data::issue: chararray,
   cc_data::subissue: chararray,
   cc_data::consumercomplaintnarrative: chararray,
   cc_data::companypublicresponse: chararray,
   cc_data::company: chararray,
   cc_data::state: chararray,
   cc_data::zip: chararray,
   cc_data::submitted: chararray,
   cc_data::datesenttocompany: chararray,
   cc_data::companyresponsetoconsumer: chararray,
   cc_data::timelyresponse: chararray,
   cc_data::consumerdisputed: chararray,
   cc_data::complaintid: int,
   cc2_data::complaintid: int,
   cc2_data::complaintamount: float,
   cc2_data::consumerzip: int,
   cc2_data::creditrating: chararray,
   cc2_data::bankrupthistory: chararray}
  </code></pre>
  
  <p>I can use a <code>FOREACH</code> and <code>GENERATE</code> on all of the fields except for complaintid field. I've even tried cc_data.complaintid. I get this error:</p>
  
  <pre><code>ERROR 1025:
  &lt;file pig_read_orcfile.pig, line 13, column 190&gt; Invalid field projection. Projected field [complaintid] does not exist in schema
  </code></pre>
  
  <p>Any ideas? Any help would be greatly appreciated!</p>