You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Matt McCline (JIRA)" <ji...@apache.org> on 2014/12/19 00:58:14 UTC

[jira] [Created] (HIVE-9168) Vectorized Coalesce for strings is broken

Matt McCline created HIVE-9168:
----------------------------------

             Summary: Vectorized Coalesce for strings is broken
                 Key: HIVE-9168
                 URL: https://issues.apache.org/jira/browse/HIVE-9168
             Project: Hive
          Issue Type: Bug
          Components: Vectorization
    Affects Versions: 0.14.0, 0.13.0
            Reporter: Matt McCline
            Assignee: Matt McCline
            Priority: Critical
             Fix For: 0.15.0, 0.14.1


Vectorized Coalesce uses BytesColumnVector.setElement which does not set the output string length correctly.

{noformat}
create table str_str_orc (str1 string, str2 string) stored as orc;

insert into table str_str_orc values (null, "X"), ("0", "X"), ("1", "X"), (null, "y");

EXPLAIN
SELECT
   str2, ROUND(sum(cast(COALESCE(str1, 0) as int))/60, 2) as result
from str_str_orc
GROUP BY str2;

SELECT
   str2, ROUND(sum(cast(COALESCE(str1, 0) as int))/60, 2) as result
from str_str_orc
GROUP BY str2;

EXPLAIN
SELECT COALESCE(str1, 0) as result
from str_str_orc;

SELECT COALESCE(str1, 0) as result
from str_str_orc;
{noformat}

Produces different results when vectorized and not vectorized.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)