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 2021/05/07 06:05:00 UTC

[jira] [Work logged] (HIVE-25071) Number of reducers limited to fixed 1 when updating/deleting

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

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

                Author: ASF GitHub Bot
            Created on: 07/May/21 06:04
            Start Date: 07/May/21 06:04
    Worklog Time Spent: 10m 
      Work Description: kasakrisz commented on a change in pull request #2231:
URL: https://github.com/apache/hive/pull/2231#discussion_r627950752



##########
File path: ql/src/test/results/clientpositive/llap/acid_no_buckets.q.out
##########
@@ -810,18 +810,18 @@ STAGE PLANS:
                       Statistics: Num rows: 500 Data size: 265500 Basic stats: COMPLETE Column stats: PARTIAL
                       Reduce Output Operator
                         key expressions: _col0 (type: struct<writeid:bigint,bucketid:int,rowid:bigint>)
-                        null sort order: z
+                        null sort order: a

Review comment:
       Null order is not depending the setting `hive.default.nulls.last`:
   https://github.com/apache/hive/blob/02be85202eb46f7207ce2925b361425d87638973/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java#L6936
   
   I tried to tackle this in #2227 but I experienced some regression in SMB joins: result set mismatch because rows with nulls introduced.
   
   Let me check how was this handled prior this patch: I think the null order came from the parent RS (which introduce the sort by ROWID) not the child (enforce bucketing + sort by ROWID).




-- 
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.

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


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

    Worklog Id:     (was: 593153)
    Time Spent: 40m  (was: 0.5h)

> Number of reducers limited to fixed 1 when updating/deleting
> ------------------------------------------------------------
>
>                 Key: HIVE-25071
>                 URL: https://issues.apache.org/jira/browse/HIVE-25071
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Krisztian Kasa
>            Assignee: Krisztian Kasa
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> When updating/deleting bucketed tables an extra ReduceSink operator is created to enforce bucketing. After HIVE-22538 number of reducers limited to fixed 1 in these RS operators.
> This can lead to performance degradation.
> Prior HIVE-22538 multiple reducers was available such cases. The reason for limiting the number of reducers is to ensure RowId ascending order in delete delta files produced by the update/delete statements.
> This is the plan of delete statement like:
> {code}
> DELETE FROM t1 WHERE a = 1;
> {code}
> {code}
> TS[0]-FIL[8]-SEL[2]-RS[3]-SEL[4]-RS[5]-SEL[6]-FS[7]
> {code}
> RowId order is ensured by RS[3] and bucketing is enforced by RS[5]: number of reducers were limited to bucket number in the table or hive.exec.reducers.max. However RS[5] does not provide any ordering so above plan may generate unsorted deleted deltas which leads to corrupted data reads.
> Prior HIVE-22538 these RS operators were merged by ReduceSinkDeduplication and the resulting RS kept the ordering and enabled multiple reducers. It could do because ReduceSinkDeduplication was prepared for ACID writes. This was removed by HIVE-22538 to get a more generic ReduceSinkDeduplication.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)