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

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

                Author: ASF GitHub Bot
            Created on: 05/Apr/23 04:40
            Start Date: 05/Apr/23 04:40
    Worklog Time Spent: 10m 
      Work Description: SourabhBadhya commented on code in PR #4181:
URL: https://github.com/apache/hive/pull/4181#discussion_r1158012483


##########
ql/src/test/queries/clientpositive/compaction_query_based_insert_only_clustered.q:
##########
@@ -0,0 +1,33 @@
+--! qt:replace:/createTime:(\d+)/#Masked#/
+--! qt:replace:/location:(\S+)/#Masked#/
+--! qt:replace:/lastAccessTime:(\d+)/#Masked#/
+--! qt:replace:/ownerType:(\S*)/#Masked#/
+--! qt:replace:/owner:(\S*)/#Masked#/
+--! qt:replace:/skewedColValueLocationMaps:(\S*)/#Masked#/
+--! qt:replace:/transient_lastDdlTime=(\d+)/#Masked#/
+--! qt:replace:/totalSize=(\d+)/#Masked#/
+--! qt:replace:/rawDataSize=(\d+)/#Masked#/
+--! qt:replace:/writeId:(\d+)/#Masked#/
+--! qt:replace:/bucketing_version=(\d+)/#Masked#/
+--! qt:replace:/id:(\d+)/#Masked#/
+
+drop table orc_bucketed;
+
+create table orc_bucketed (a int, b string) clustered by (a) into 3 buckets 
stored as orc TBLPROPERTIES('transactional'='true', 
'transactional_properties'='insert_only');
+
+insert into orc_bucketed values('1', 'text1');
+insert into orc_bucketed values('2', 'text2');
+insert into orc_bucketed values('3', 'text3');
+insert into orc_bucketed values('4', 'text4');
+insert into orc_bucketed values('5', 'text5');
+insert into orc_bucketed values('6', 'text6');
+insert into orc_bucketed values('7', 'text7');
+insert into orc_bucketed values('8', 'text8');
+insert into orc_bucketed values('9', 'text9');
+insert into orc_bucketed values('10', 'text10');
+
+describe extended orc_bucketed;
+alter table orc_bucketed compact 'MAJOR' and wait;
+analyze table orc_bucketed compute statistics;

Review Comment:
   Stats update on query based compaction depends upon this config - 
   `hive.compactor.gather.stats`
   Source - 
https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Worker.java#L103
   
https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Worker.java#L444
   
   After taking a deeper look, this config seems to be disabled in 
MiniLlapLocalCompactorCliDriver here as part of HIVE-26802 - 
   
https://github.com/apache/hive/blob/master/itests/util/src/main/java/org/apache/hadoop/hive/cli/control/CliConfigs.java#L271
   
   @zratkai Is there any reason why this was disabled as part of HIVE-26802? I 
did try some tests locally and I was able to see correct stats after removing 
this disabling config line from CliConfigs.





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

    Worklog Id:     (was: 854933)
    Time Spent: 1h 10m  (was: 1h)

> Add compaction pending Qtest for Insert-only, Partitioned, Clustered ACID, 
> and combination Tables 
> --------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-27203
>                 URL: https://issues.apache.org/jira/browse/HIVE-27203
>             Project: Hive
>          Issue Type: Test
>    Affects Versions: 4.0.0
>            Reporter: Akshat Mathur
>            Assignee: Akshat Mathur
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Improve Qtest Coverage for Compaction use cases for ACID Tables:
>  # Partitioned Tables( Major & Minor ) 
>  # Insert-Only Clustered( Major & Minor )
>  # Insert-Only Partitioned( Major & Minor ) 
>  # Insert-Only Clustered and Partitioned( Major & Minor ) 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to