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

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

                Author: ASF GitHub Bot
            Created on: 14/Nov/22 12:50
            Start Date: 14/Nov/22 12:50
    Worklog Time Spent: 10m 
      Work Description: SourabhBadhya commented on code in PR #3746:
URL: https://github.com/apache/hive/pull/3746#discussion_r1021486443


##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactionQueryBuilder.java:
##########
@@ -287,16 +302,27 @@ private void buildAddClauseForAlter(StringBuilder query) {
   private void buildSelectClauseForInsert(StringBuilder query) {
     // Need list of columns for major crud, mmmajor partitioned, mmminor
     List<FieldSchema> cols;
-    if (major && crud || major && insertOnly && sourcePartition != null || 
minor && insertOnly) {
+    if (rebalance || major && crud || major && insertOnly && sourcePartition 
!= null || minor && insertOnly) {
       if (sourceTab == null) {
         return; // avoid NPEs, don't throw an exception but skip this part of 
the query
       }
       cols = sourceTab.getSd().getCols();
     } else {
       cols = null;
     }
-
-    if (crud) {
+    if (rebalance) {
+      query.append("0, t2.writeId, t2.rowId % ");
+      query.append(numberOfBuckets);

Review Comment:
   Understood. Thanks for the info.





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

    Worklog Id:     (was: 825739)
    Time Spent: 2h 10m  (was: 2h)

> Query based Rebalance compaction on full acid tables
> ----------------------------------------------------
>
>                 Key: HIVE-26716
>                 URL: https://issues.apache.org/jira/browse/HIVE-26716
>             Project: Hive
>          Issue Type: Sub-task
>          Components: Hive
>            Reporter: László Végh
>            Assignee: László Végh
>            Priority: Major
>              Labels: ACID, compaction, pull-request-available
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> Support rebalancing compaction on fully ACID tables.



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

Reply via email to