hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (Jira)" <>
Subject [jira] [Work logged] (HIVE-25400) Move the offset updating in BytesColumnVector to setValPreallocated.
Date Wed, 28 Jul 2021 18:24:00 GMT


ASF GitHub Bot logged work on HIVE-25400:

                Author: ASF GitHub Bot
            Created on: 28/Jul/21 18:23
            Start Date: 28/Jul/21 18:23
    Worklog Time Spent: 10m 
      Work Description: pavibhai commented on a change in pull request #2543:

File path: storage-api/src/java/org/apache/hadoop/hive/ql/exec/vector/
@@ -213,18 +211,17 @@ public void setVal(int elementNum, byte[] sourceBuf) {
    * Ensures that we have space allocated for the next value, which has size
    * length bytes.
-   * Updates currentValue, currentOffset, and sharedBufferOffset for this value.
+   * Updates currentValue and currentOffset for this value.
-   * Always use before getValPreallocatedBytes, getValPreallocatedStart,
-   * and setValPreallocated.
+   * Always use before getValPreallocatedBytes, getValPreallocatedStart.
+   * setValPreallocated must be called to actually reserve the bytes.
   public void ensureValPreallocated(int length) {
     if ((sharedBufferOffset + length) > sharedBuffer.length) {
       currentValue = allocateBuffer(length);

Review comment:
       This is unrelated to the fix but feels like only currentValue is getting assigned while
currentOffset is also being changed inside allocateBuffer method.
   Since allocateBuffer is private and not used elsewhere, we could move both the assignments
of currentValue and currentOffset into the allocateBuffer method and have this as
       if ((sharedBufferOffset + length) > sharedBuffer.length) {
       } else {
         currentValue = sharedBuffer;
         currentOffset = sharedBufferOffset;

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:

For queries about this service, please contact Infrastructure at:

Issue Time Tracking

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

> Move the offset updating in BytesColumnVector to setValPreallocated.
> --------------------------------------------------------------------
>                 Key: HIVE-25400
>                 URL:
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Owen O'Malley
>            Assignee: Owen O'Malley
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: storage-2.7.3, storage-2.8.1, storage-2.9.0
>          Time Spent: 20m
>  Remaining Estimate: 0h
> HIVE-25190 changed the semantics of BytesColumnVector so that ensureValPreallocated reserved
the room, which interacted badly with ORC's redact mask code. The redact mask code needs to
be able to increase the allocation as it goes so it can call the ensureValPreallocated multiple

This message was sent by Atlassian Jira

View raw message