title: Slow hive query execution for remote connection
body: <p>I hope you will be able to help me with my question. Basically I found that there is a significant difference in Hive query (Spark SQL) execution time when I execute it directly on the Edge Node and when I execute on my local machine connected to remote Hive metastore. 
  When I execute query like :</p>
  
  <pre><code>select max(column) from table
  </code></pre>
  
  <p>It seems like, first it fetch the whole table to my PC, and then do the query execution for MAX. Because nothing happens for 2 minutes or so, and then it goes to stage phase and this takes just 2 seconds. When I looked and the query execution on the Web UI, it seems like nothing happened for 2 minutes and then the query started execution locally. </p>
  
  <p>I am wondering if you could advise how Spark processes remote queries? Is that way how I suspect, so basically it fetch all the data from the table first, and then execute a query on it locally?  Seems like this is a real bottleneck in my case.</p>
  
  <p>Thanks </p>
  
  <p>Tom</p>