Skip to content

Commit

Permalink
[SPARK-34153][SQL][2.4] Remove unused getRawTable() from `HiveExter…
Browse files Browse the repository at this point in the history
…nalCatalog.alterPartitions()`

### What changes were proposed in this pull request?
Remove unused call of `getRawTable()` from `HiveExternalCatalog.alterPartitions()`.

### Why are the changes needed?
It reduces the number of calls to Hive External catalog.

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
By existing test suites.

Authored-by: Max Gekk <max.gekkgmail.com>
Signed-off-by: HyukjinKwon <gurwls223apache.org>
(cherry picked from commit bea10a6)
Signed-off-by: Max Gekk <max.gekkgmail.com>

Closes #31242 from MaxGekk/remove-getRawTable-from-alterPartitions-2.4.

Authored-by: Max Gekk <max.gekk@gmail.com>
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
  • Loading branch information
MaxGekk authored and HyukjinKwon committed Jan 19, 2021
1 parent e0e1e21 commit 96d2533
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1102,9 +1102,6 @@ private[spark] class HiveExternalCatalog(conf: SparkConf, hadoopConf: Configurat
table: String,
newParts: Seq[CatalogTablePartition]): Unit = withClient {
val lowerCasedParts = newParts.map(p => p.copy(spec = lowerCasePartitionSpec(p.spec)))

val rawTable = getRawTable(db, table)

// convert partition statistics to properties so that we can persist them through hive api
val withStatsProps = lowerCasedParts.map { p =>
if (p.stats.isDefined) {
Expand Down

0 comments on commit 96d2533

Please sign in to comment.