Author: pradeepkth
Date: Fri Sep 25 17:47:24 2009
New Revision: 818929

URL: http://svn.apache.org/viewvc?rev=818929&view=rev
Log:
PIG-942: Maps are not implicitly casted (fixed a possible NPE from earlier 
commit for this patch) (pradeepkth)

Modified:
    hadoop/pig/trunk/src/org/apache/pig/impl/logicalLayer/LOCast.java

Modified: hadoop/pig/trunk/src/org/apache/pig/impl/logicalLayer/LOCast.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/impl/logicalLayer/LOCast.java?rev=818929&r1=818928&r2=818929&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/impl/logicalLayer/LOCast.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/impl/logicalLayer/LOCast.java Fri Sep 
25 17:47:24 2009
@@ -70,7 +70,9 @@
     public Schema.FieldSchema getFieldSchema() throws FrontendException {
         if(!mIsFieldSchemaComputed) {
             mFieldSchema = new Schema.FieldSchema(null, mType);
-            mFieldSchema.setParent(getExpression().mFieldSchema.canonicalName, 
getExpression());
+            Schema.FieldSchema parFs  = getExpression().getFieldSchema();
+            String canonicalName = (parFs != null ? parFs.canonicalName : 
null);
+            mFieldSchema.setParent(canonicalName, getExpression());
             mIsFieldSchemaComputed = true;
         }
         return mFieldSchema;


Reply via email to