Skip to content

Commit f5f37b2

Browse files
marmbrusrxin
authored andcommitted
[SPARK-2370][SQL] Decrease metadata retrieved for partitioned hive queries.
Author: Michael Armbrust <[email protected]> Closes #1305 from marmbrus/usePrunerPartitions and squashes the following commits: 744aa20 [Michael Armbrust] Use getAllPartitionsForPruner instead of getPartitions, which avoids retrieving auth data (cherry picked from commit 9d006c9) Signed-off-by: Reynold Xin <[email protected]>
1 parent 55c427a commit f5f37b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ private[hive] class HiveMetastoreCatalog(hive: HiveContext) extends Catalog with
5454
val table = client.getTable(databaseName, tableName)
5555
val partitions: Seq[Partition] =
5656
if (table.isPartitioned) {
57-
client.getPartitions(table)
57+
client.getAllPartitionsForPruner(table).toSeq
5858
} else {
5959
Nil
6060
}

0 commit comments

Comments
 (0)