title: AnalysisException: cannot resolve given input columns:
body: <p>I am running in to this error when  I am trying to select a couple of columns from the temporary table.</p>
  <pre><code>pd_df = pd.read_sql('select * from abc.cars limit 10', conn)
  
  df = spark.createDataFrame(pd_df)
  df.createOrReplaceTempView(&quot;cars_tmp&quot;)
  df.show()
  
  print('***************')
  print(&quot;Reading from tmp table&quot;)
  data = spark.sql('select location_id from cars_tmp')
  data.show()
  
  
  AnalysisException: cannot resolve '`location_id`' given input columns: [cars_tmp.abc.product_id, cars_tmp.abc.location_id ...]
  </code></pre>
  <p>When I select all the columns I get the results. So this is successful:</p>
  <pre><code>data = spark.sql('select * from cars_tmp')
  data.show()
  </code></pre>
  <p>I tried below queries but they fail as well with the same error:</p>
  <pre><code>data = spark.sql('select cars_tmp.abc.location_id from cars_tmp')
  data.show()
  
  data = spark.sql('select cars_tmp.location_id from cars_tmp')
  data.show()
  
  data = spark.sql('select abc.location_id from cars_tmp')
  data.show()
  </code></pre>
  <p>I am running these in datbricks.
  Databricks runtime version: 7.0
  Apache Spark version: 3.0
  scala: 2.12</p>
  <p>or &quot;spark_version&quot;: &quot;7.0.x-scala2.12&quot;,</p>
  <p>Any help will be highly appreciated.</p>
  <p>Thanks</p>