You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Hive QA (JIRA)" <ji...@apache.org> on 2017/02/06 13:24:41 UTC

[jira] [Commented] (HIVE-14450) Vectorization: StringExpr::truncate() can assume 1 byte per-char minimum

    [ https://issues.apache.org/jira/browse/HIVE-14450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15853977#comment-15853977 ] 

Hive QA commented on HIVE-14450:
--------------------------------



Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12851156/HIVE-14450.1.patch

{color:red}ERROR:{color} -1 due to no test(s) being added or modified.

{color:red}ERROR:{color} -1 due to 3 failed/errored test(s), 10226 tests executed
*Failed tests:*
{noformat}
TestDerbyConnector - did not produce a TEST-*.xml file (likely timed out) (batchId=235)
org.apache.hadoop.hive.cli.TestEncryptedHDFSCliDriver.testCliDriver[encryption_join_with_different_encryption_keys] (batchId=159)
org.apache.hadoop.hive.llap.daemon.impl.TestTaskExecutorService.testWaitQueuePreemption (batchId=277)
{noformat}

Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/3394/testReport
Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/3394/console
Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-3394/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
Tests exited with: TestsFailedException: 3 tests failed
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12851156 - PreCommit-HIVE-Build

> Vectorization: StringExpr::truncate() can assume 1 byte per-char minimum
> ------------------------------------------------------------------------
>
>                 Key: HIVE-14450
>                 URL: https://issues.apache.org/jira/browse/HIVE-14450
>             Project: Hive
>          Issue Type: Improvement
>          Components: Vectorization
>    Affects Versions: 2.2.0
>            Reporter: Gopal V
>            Assignee: Teddy Choi
>         Attachments: HIVE-14450.1.patch
>
>
> {code}
> public static int truncate(byte[] bytes, int start, int length, int maxLength) {
>     int end = start + length;
>     // count characters forward
>     int j = start;
>     int charCount = 0;
>     while(j < end) {
>       // UTF-8 continuation bytes have 2 high bits equal to 0x80.
>       if ((bytes[j] & 0xc0) != 0x80) {
>         if (charCount == maxLength) {
>           break;
>         }
>         ++charCount;
>       }
>       j++;
>     }
>     return (j - start);
>   }
> {code}
> Should not read the bytes if the maxLength is 4096 and the input string has 256 bytes.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)