You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/03/02 08:46:00 UTC

[jira] [Work logged] (HIVE-25894) Table migration to Iceberg doesn't remove HMS partitions

     [ https://issues.apache.org/jira/browse/HIVE-25894?focusedWorklogId=735179&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-735179 ]

ASF GitHub Bot logged work on HIVE-25894:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 02/Mar/22 08:45
            Start Date: 02/Mar/22 08:45
    Worklog Time Spent: 10m 
      Work Description: marton-bod commented on a change in pull request #3061:
URL: https://github.com/apache/hive/pull/3061#discussion_r817466517



##########
File path: standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java
##########
@@ -3939,8 +3939,8 @@ protected boolean getPartitionsByExprInternal(String catName, String dbName, Str
       boolean allowSql, boolean allowJdo) throws TException {
     assert result != null;
 
-    final ExpressionTree exprTree = PartFilterExprUtil.makeExpressionTree(expressionProxy, expr,
-                                                    getDefaultPartitionName(defaultPartitionName), conf);
+    final ExpressionTree exprTree = expr.length != 0 ? PartFilterExprUtil.makeExpressionTree(

Review comment:
       Can you explain why this change was needed?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 735179)
    Time Spent: 20m  (was: 10m)

> Table migration to Iceberg doesn't remove HMS partitions
> --------------------------------------------------------
>
>                 Key: HIVE-25894
>                 URL: https://issues.apache.org/jira/browse/HIVE-25894
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Zoltán Borók-Nagy
>            Assignee: Peter Vary
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Repro:
> {code:java}
> create table ice_part_migrate (i int) partitioned by (p int) stored as parquet;
> insert into ice_part_migrate partition(p=1) values (1), (11), (111);
> insert into ice_part_migrate partition(p=2) values (2), (22), (222);
> ALTER TABLE ice_part_migrate  SET TBLPROPERTIES ('storage_handler'='org.apache.iceberg.mr.hive.HiveIcebergStorageHandler');
> {code}
> Then looking at the HMS database:
> {code:java}
> => select "PART_NAME" from "PARTITIONS" p, "TBLS" t where t."TBL_ID"=p."TBL_ID" and t."TBL_NAME"='ice_part_migrate';
>  PART_NAME
> -----------
>  p=1
>  p=2
> {code}
> This is weird because Iceberg tables are supposed to be unpartitioned. It also breaks some precondition checks in Impala. Is there a particular reason to keep the partitions in HMS?



--
This message was sent by Atlassian Jira
(v8.20.1#820001)