title: pyspark: AnalysisException when joining two data frame
body: <p>I have two data frame created from sparkSQL:</p>
  
  <pre><code>df1 = sqlContext.sql(""" ...""")
  df2 = sqlContext.sql(""" ...""")
  </code></pre>
  
  <p>I tried to join these two data frame on the column <code>my_id</code> like below:</p>
  
  <pre><code>from pyspark.sql.functions import col
  
  combined_df = df1.join(df2, col("df1.my_id") == col("df2.my_id"), 'inner')
  </code></pre>
  
  <p>Then I got the following error. Any idea what I missed? Thanks!</p>
  
  <pre><code>AnalysisException                         Traceback (most recent call last)
  &lt;ipython-input-11-45f5313387cc&gt; in &lt;module&gt;()
        3 from pyspark.sql.functions import col
        4 
  ----&gt; 5 combined_df = df1.join(df2, col("df1.my_id") == col("df2.my_id"), 'inner')
        6 combined_df.take(10)
  
  /usr/local/spark-latest/python/pyspark/sql/dataframe.py in join(self, other, on, how)
      770                 how = "inner"
      771             assert isinstance(how, basestring), "how should be basestring"
  --&gt; 772             jdf = self._jdf.join(other._jdf, on, how)
      773         return DataFrame(jdf, self.sql_ctx)
      774 
  
  /usr/local/spark-latest/python/lib/py4j-0.10.4-src.zip/py4j/java_gateway.py in __call__(self, *args)
     1131         answer = self.gateway_client.send_command(command)
     1132         return_value = get_return_value(
  -&gt; 1133             answer, self.gateway_client, self.target_id, self.name)
     1134 
     1135         for temp_arg in temp_args:
  
  /usr/local/spark-latest/python/pyspark/sql/utils.py in deco(*a, **kw)
       67                                              e.java_exception.getStackTrace()))
       68             if s.startswith('org.apache.spark.sql.AnalysisException: '):
  ---&gt; 69                 raise AnalysisException(s.split(': ', 1)[1], stackTrace)
       70             if s.startswith('org.apache.spark.sql.catalyst.analysis'):
       71                 raise AnalysisException(s.split(': ', 1)[1], stackTrace)
  
  AnalysisException: "cannot resolve '`df1.my_id`' given input columns: [...
  </code></pre>