https://github.com/apache/spark
Revision 2e55fc839192d4b1821bf454c304f2fcedce1960 authored by Max Gekk on 16 December 2020, 14:30:47 UTC, committed by HyukjinKwon on 16 December 2020, 14:30:47 UTC
### What changes were proposed in this pull request?
Throw `NoSuchPartitionsException` from `ALTER TABLE .. DROP TABLE` for not existing partitions of a table in V1 Hive external catalog.

### Why are the changes needed?
The behaviour of Hive external catalog deviates from V1/V2 in-memory catalogs that throw `NoSuchPartitionsException`. To improve user experience with Spark SQL, it would be better to throw the same exception.

### Does this PR introduce _any_ user-facing change?
Yes, the command throws `NoSuchPartitionsException` instead of the general exception `AnalysisException`.

### How was this patch tested?
By running new UT via:
```
$ build/sbt -Phive -Phive-thriftserver "test:testOnly *HiveDDLSuite"
```

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

Closes #30802 from MaxGekk/hive-drop-partition-exception-3.1.

Authored-by: Max Gekk <max.gekk@gmail.com>
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
1 parent 22ef681
History
Tip revision: 2e55fc839192d4b1821bf454c304f2fcedce1960 authored by Max Gekk on 16 December 2020, 14:30:47 UTC
[SPARK-33788][SQL][3.1][3.0][2.4] Throw NoSuchPartitionsException from HiveExternalCatalog.dropPartitions()
Tip revision: 2e55fc8

README.md

back to top