[SPARK-2370][SQL] Decrease metadata retrieved for partitioned hive queries.