Skip to content

Conversation

@mark-bathori
Copy link
Contributor

@mark-bathori mark-bathori commented Nov 12, 2021

What changes were proposed in this pull request?

After the application of HADOOP-17901 and HADOOP-17905 they changed the backing array increment logic which is causing issues in the UDFSpace class.

Why are the changes needed?

The previous result.getBytes().length is returning incorrect size which is causing error in the result output. By changing this method call to result.getLength() the size calculation is correct again any the original behaviour is restored.

Example of the UDFSpace behaviour with the different method calls:

space parameter - 11
result.getBytes().length - 0
result.getLength() - 0

space parameter - 12
result.getBytes().length - 11
result.getLength() - 11

space parameter - 13
result.getBytes().length - 16
result.getLength(): 12

space parameter - 14
result.getBytes().length - 16
result.getLength() - 13

Note that the issue is only present with Hadoop version that contains HADOOP-17901 and HADOOP-17905.

Does this PR introduce any user-facing change?

No

How was this patch tested?

The change was tested on live cluster and also in the new qtest that was introduced in the scope of this patch.

@zabetak zabetak self-requested a review November 15, 2021 15:00
@zabetak zabetak self-assigned this Nov 15, 2021
@zabetak zabetak added the discussion-in-jira There is open discussion in JIRA that needs to be resolved before merging this change label Nov 15, 2021
@zabetak zabetak closed this in 6e02f61 Nov 16, 2021
HarshitGupta11 pushed a commit to HarshitGupta11/hive that referenced this pull request Dec 12, 2021
…P-17905 (Mark Bathori, reviewed by Stamatis Zampetakis)

At the moment the problem does not appear cause Hive is still using
3.1.0 version. However, if Hadoop 3.4.0 (or greater) is in use the
function generate incorrect results cause the underlying implementation
of Text has changed.

Closes apache#2786
dengzhhu653 pushed a commit to dengzhhu653/hive that referenced this pull request Dec 15, 2022
…P-17905 (Mark Bathori, reviewed by Stamatis Zampetakis)

At the moment the problem does not appear cause Hive is still using
3.1.0 version. However, if Hadoop 3.4.0 (or greater) is in use the
function generate incorrect results cause the underlying implementation
of Text has changed.

Closes apache#2786
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

discussion-in-jira There is open discussion in JIRA that needs to be resolved before merging this change tests unstable

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants