[
https://issues.apache.org/jira/browse/HIVE-26716?focusedWorklogId=825701&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-825701
]
ASF GitHub Bot logged work on HIVE-26716:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 14/Nov/22 10:43
Start Date: 14/Nov/22 10:43
Worklog Time Spent: 10m
Work Description: SourabhBadhya commented on code in PR #3746:
URL: https://github.com/apache/hive/pull/3746#discussion_r1021339570
##########
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:
Is the logic to assign bucketId = rowId % numberOfBuckets?
Issue Time Tracking
-------------------
Worklog Id: (was: 825701)
Time Spent: 1h 10m (was: 1h)
> 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: 1h 10m
> Remaining Estimate: 0h
>
> Support rebalancing compaction on fully ACID tables.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)