[
https://issues.apache.org/jira/browse/HIVE-27914?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Butao Zhang resolved HIVE-27914.
--------------------------------
Fix Version/s: 4.1.0
Resolution: Fixed
Merged into master branch!
Thanks for your contribution! [~wechar]
> Fix the missing partitions judgement in drop_partitions_req
> -----------------------------------------------------------
>
> Key: HIVE-27914
> URL: https://issues.apache.org/jira/browse/HIVE-27914
> Project: Hive
> Issue Type: Bug
> Reporter: Wechar
> Assignee: Wechar
> Priority: Major
> Labels: pull-request-available
> Fix For: 4.1.0
>
>
> When call {{drop_partitions_req}} by partition expressions, HMS determine if
> there are missing partitions by the fetched partitions number, which is not
> correct.
> For example, assuming that we have a table {{tbl}} with partition names:
> {code:bash}
> dt=20231129/hr=10
> dt=20231129/hr=11
> {code}
> Then we try to drop partitions by sql:
> {code:sql}
> alter table tbl drop partition (dt='20231129'), partition (dt='20231130');
> {code}
> It should throw `NoSuchObjectException` because filter {{dt='20231130'}} can
> not match any partitions.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)