Description
Currently Spark answers the SHOW PARTITIONS query by fetching all of the table's partition metadata from the external catalog and constructing partition names therefrom. The Hive client has a getPartitionNames method which is orders of magnitude faster, with the performance improvement scaling up with the number of partitions in the table. I believe we can use this method to great effect.
Further details are provided in the associated PR.